3/17/2026 2:25:32 AM
|
| |
| slxdeveloper.com Community Forums |
|
| |
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
ExecuteScaler and ExecuteReader in 7.5.2 web
Posted: 01 Feb 10 1:22 PM
|
I can get ExcuteScaler to work in a C# Snippet, but I can't get ExecuteReader to work to retrieve multiple records from oracle. Support appreciated.
strSQLOwnerInfo = " Select userid from userinfo"; using (System.Data.OleDb.OleDbConnection connownerinfo = new System.Data.OleDb.OleDbConnection(datasvc.GetConnectionString())) { connownerinfo.Open(); using (System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand(strSQLOwnerInfo, connownerinfo)) { rdrownerinfo = cmd.ExecuteReader(); while (rdrownerinfo.Read()) { UID = (string)rdrownerinfo["userid"]; } } |
|
|
|
Re: ExecuteScaler and ExecuteReader in 7.5.2 web
Posted: 01 Feb 10 1:59 PM
|
What is the error you're getting? That will definitely help.
Also, have you tried upper casing the table and field names? If the Oracle implementation is case-sensitive then that would be a problem. |
|
|
|
Re: ExecuteScaler and ExecuteReader in 7.5.2 web
Posted: 12 Feb 10 10:36 AM
|
| Is this all the code? I hope not - for a start you havent declared the datareader..also dont you hgave to use a ToString() after the rdownerinfo["userid"]? Incidentially you should use the co;lumn ordinal as (apparently) its quicker so rdownerinfo[0].ToString(); If you use a tostring() you wont have to cast either. |
|
|
|
Re: ExecuteScaler and ExecuteReader in 7.5.2 web
Posted: 12 Feb 10 10:42 AM
|
| Also its worth noting that if you are just setting the same UID every time it will always be one value (even it if it has looped through all the records). You would have to append the values to the variable or do whatever you have to. Grandma.....suck eggs....sorry you have probably left out your code for the post but worth checking. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|