0

i am new with SQL server 2005 and visual studio 2008 please help me..how do i connect the forms and the tables in the database

3
Contributors
4
Replies
7
Views
6 Years
Discussion Span
Last Post by Netcode
0

This may not be what you are looking for but this should point you in the right direction:

Dim Connect As String = "Provider=SQLOLEDB.1;Password=xxxx;Persist Security Info=True;User ID=xxx;Initial Catalog=Your database name;Data Source=Your server Name"
Dim SQLCMD As String = "Your SQL Command"
Dim myConnection As New OleDbConnection(Connect)
Dim myCommand As New OleDbDataAdapter(strsql, myConnection)

Also, make sure to import the following code above your class:

Imports System.Data.OleDb

Edited by NetJunkie: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.