A Blog of a Work from Home Breadwinner. Blogging anything under the sun since college days.

Learning Kentico: How to Fix SQL Query problems for Custom Tables (Form Control Dropdown List)

Yey! I'm finally done with Custom Module exercises. I was really stucked with this for weeks/month because everything was new to me. I have to read a lot of info from the documentation and it was really hard to understand. Eventhough I passed all the tests but I don't like to proceed to the next topic if I can't do the exercises. I'm just so happy, I finally did it. 

But before I was able to completely finished it, I encountered two more issues when trying to display the data from the custom table. This is related to SQL query problems in Form Control Dropdown List. See screenshot below: 

Invalid Object Name
Invalid object Name (click image to enlarge)




1. Invalid Object Name
- so for this one, I didn't correctly choose the database table name. I have put the Display name instead.

can't find column, sql query problem
Can't find column 1 (click image to enlarge)

2. Can't find Column 1
- this is because I thought just putting one 'Specialty Name' in the query would be enough.  The correct one/format is  this:

SELECT SpecialtyName, SpecialtyName FROM customtable_doctorspecialty

select query
correct sql query (click to enlarge)

Next would be Kentico API exercises!

Share:

No comments:

Post a Comment