Can someone give me an example of how to simply connect to a database - insert, update, delete, select
Thank You
Printable View
Can someone give me an example of how to simply connect to a database - insert, update, delete, select
Thank You
I'm writing for a T1000, I suppose ;)
This is an example to open connection:
Public CnnGIN As New ADODB.Connection
StrConn = "Integrated Security=SSPI;Provider=Microsoft OLE DB Provider for SQL Server;Data Source=NBOOKALEX\GINMSDE;Initial Catalog=GinNetSQL;Workstation ID=NBOOKALEX"
GIN.CnnGIN.Open(StrConn)
Then I have to know if you think to use ADO and ADODB Recordset, or not. I use them and all my example and experience are based on that. If you plain to use ADO.NET, DATASET, DATAADAPTER, ecc....I'm the wrong person!:rolleyes:
Thanks Alex, but I am just looking for the correct method to access the database in .Net.
I know how to use ADO 2.6 but want to know about the sql adapter and ado.net.
There's great examples in MSDN - just search for what you want in your IDE.