Question Locked

visual basic

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi,
im using vb2005 and i want to execute a sql statement using backend of visual basic and i want to get the database behind to the odbc. what kind of variable to vb can i use and work it? thanks..

2 replies

by tony hopkinson

It's all in the connectionstring.

http://www.connectionstrings.com/

If it was direct to SQL Server executing a query in C#, VB.NET uses the same classes.

is
SqlCommand cmd = new SqlCommand(sqltext,fConnection);
cmd.ExecuteNonQuery();

where fConnection is an open instance of SQLConnection with it's connectionstring set to poiint at the required server.

This discussion is closed to new replies.