When using the SQL Request Control, I am able to successfully connect to our database, and execute the query. When in preview mode, or after publishing the form, the control is failing to populate with any values.
can not it be a problem with data returned?
could you try to add to your statement (format it properly, I'm not sure whether it should be numeric or string value):
where EmployeeNum = 0665
next I would try to explicitly convert EID to numeric like (I'm not sure about proper syntax for your DB, so use respective conversion function in place of to_number() )
select to_number(EmployeeNum) as EID, EmployeeNum as EVal from ....
I think 'Value field' and Display field' fields should refer to columns returned by SQL.
so either put there directly SQL column name (EmployeeNum) or populate Staff_ID reference with string 'EmployeeNum'
Unfortunately this did not help
can you post a screenshot what you have exactly tried?
I will post them below
Also try this. Under advanced make sure control mode is set to Edit.
So how did you make the new sql statement, is it like
SELECT EmployeeNum AS Staff_ID FROM VW_viewname
Or you can try giving EmployeeNum as Display and value field
I made the Value and Display fields both EmployeeNum, displays on run now, but not on form:
Then I changed the control mode to Edit, but got the exact same results
could you try to rewrite your statement as follows:
select EmployeeNum as EID, EmployeeNum as EVal from ....
'Value field' to EID
'Display field' to EVal
Still did not work - worked in run now, but nothing in the form
I actually just got it to work (most of the way) I just need to figure out one final kink and then I will post a screen shot! Thank you for your help!!
Curious to see the reason
Do not forget to mark question answered then.
so using EID worked
Now I am trying to add a where clause to say
SELECT EmployeeNum AS EID FROM vw_Ext_Sharepoint_StaffActive WHERE LoginUsername = 'username'
Where username is that field floating out there. However I can not seem to get rid of the prefix on the username to match what is in my SQL database table. Grrr....
But for what I asked in this question, I would say it is answered. Thank you for the help!!
Retrieving data ...