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!
|
|
RecordSets in Web
Posted: 07 Dec 09 5:50 PM
|
What is the equilivant of Set GetNewRecordset = CreateObject("ADODB.Recordset") in SalesLogix web ?
I can do: IContact contact = EntityFactory.Create(); but I want to be able to access the fields with the field name as a string like i could in VbScript.
then i tried using a IDataReader class; but, i didnt see any method to save or update record.
Do i have to load the IDataReader into a DataTable ?
Anyone, know the method in SalesLogix Web 7.5.1 ?
|
|
|
|
Re: RecordSets in Web
Posted: 08 Dec 09 1:37 AM
|
You can always access the DB Directly by just getting a Connection and retreiving a .Net DataSet or DataReader (if you only want to read the data).
Off course, it may be just simpler to use the Object model, any reason why you would want to go this route?
|
|
|
|
Re: RecordSets in Web
Posted: 08 Dec 09 9:27 AM
|
Raul
Thanks for the feedback; but, i'm not sure i follow your Object model idea. Can you explain or give/point to an example? Is it a SalesLogix wrapper object? or are you refering to doing the Update via SQL statements? |
|
|
|
Re: RecordSets in Web
Posted: 08 Dec 09 9:49 AM
|
No, I am talking about using the Objects as per your code example:
IContact cont = ..... then you would address the fields as cont.FIELDNAME
Now, as I stated, you can still open up a direct connection to the DB using ADO.Net and retreive a DataSet if that is what you are looking for. |
|
|
|
Re: RecordSets in Web
Posted: 15 Dec 09 7:09 AM
|
Jeffery, could you identify why you need to access the fields by string when working with the entity framework. Note that if you are doing direct dataset manipulation you are going outside of the entity model and its rules and events. You can access the entity model types themselves via reflection to access the properties as string. Look at something like System.Reflection.PropertyInfo ... you could also use OleDbDataAdapter/OleDbCommandBuilder and DataRows to handle doing your updates if you really have to be outside of the entity model.
Mark
|
|
|
|