Wendy,
Just open a form. Go to the toolbox and drag a sqldatadapter wizard on your
form and follow the steps, than you all kind of SQL code that is created if
yu open your designer part of a form.
With that wizard you can as well make stored procedures. I prefer at the
start to use dynamic SQL (sqlStrings). It is almost no problem to change
that when you are ready to a SP.
(It is easy to build everything by hand as well if you are more used to it).
For pure datatransaction SQL it is better to use stored procedures. However
if you have to make them complex to use them in a general way and they are
not often used, than dynamic SQL seems to be better, because the SP has to
be compiled every time at first use.
If are ready with the wizard and than rightclick on the icon
(sqldataadapter), than you can select to generate Dataset to create a
strongly typed dataset from that.
If you want to use an SQL string inside the code (by instance to create a
new datatable) than you can process it with the
system.data.sqlclient.sqlcommand class methods as
executequery (this gives nothing back) (except the rows affected)
executescalar(this gives back the first value)
or read a resultset with
system.data.sqlclient.sqldatareader
From a DTS package you can make a VB6 program, that you have to convert to
VBNet if you want to use that.
There is inbuild in the current and next VBNet version 'Expression syntax'
to process dataset/datatables. (This is not SQL, what a lot of people at the
start think and than have problems).
The build in expression language (or better a new one) is planned to be
extended for more general use in future, be aware it is not SQL syntax.
(However, it will as every expression syntax look like that. SQL was not
the first expression language).
I hope this helps,
Cor
"Wendy Elizabeth" <We************@discussions.microsoft.com> schreef in
bericht news:F5**********************************@microsof t.com...
I have the following questions about VB.NET interfacing with sql server
2000:
1. I have heard that VB.NET can run with inline SQL. Can you show me how
to
use
inline sql to access a sql server 2000 database?
2. How do you setup stored procedures using Visual basic.net?
3. What is better to use and why, either inline sql or stored procedures?
4. Can you execute a visual basic.net program from a DTS package? If so,
show would you accomplish this task?