Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SqlExec Equivalent?
Message
From
30/10/2007 17:13:37
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 2.0
OS:
Vista
Database:
VistaDB
Miscellaneous
Thread ID:
01265186
Message ID:
01265198
Views:
9
Another possibility is the "Sqlcommand". You can start with this and see if it gives you any ideas:

http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson03.aspx

>Is there anything like the VFP sqlexec command in the dataset, tableadapter world?
>
>I have a database with 2 tables; parent/child.
>
>I have managed with help from all here and Google, to create a form that uses tableadapters which allows me to navigate through the parent and child using a pick list box with parent data bound to fields on the form and a grid for the child records. I can edit and add parent data and even batch update the child table.
>
>Now I want to allow the user to right click on the batch update button and display a dialog form that is populated with distinct dates of when updates were performed so they may revert one of the batch updates.
>
>I need to be able to get a distinct list of the dates from the child table. Childs play (ugh sorry couldn’t resist) in vfp where I could use sqlexec to select distinct or group by and get a result to throw into a pick list. But if I create a new fillbydistinctdate method in my dataset/tableadapter I get a message warning me the schema does not match what I already have and if I continue my original form is toast.
>
>If I try to use the select method of the datatable I get an error at run time that indicates “distinct” is not allowed.
>
>drfound = dSRA.RATRANS.Select("distinct transdate”);
>and
>drfound = dSRA.RATRANS.Select("distinct transdate >= #01/01/2007#");
>
>both return ‘missing opperand after transdate’
>
>Thanks again.

(On an infant's shirt): Already smarter than Bush
Previous
Reply
Map
View

Click here to load this message in the networking platform