Question srcipt for sql connection

lye85

New member
Joined
Jul 19, 2010
Messages
1
Programming Experience
Beginner
perviously i use ms access (.accdb) as my database, my sql connection is

Dim connstr As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source = LibraryDatabase.accdb"

now i have add a new customer.mdf with tables in my project, but what is the script for sql connection for (.mdf)?
 
First up, there's no script. VB.NET is not a scripting language so there's no script. VBScript is used to write scripts.

As for the question, the ADO.NET code is basically the same, except you use classes from the SqlClient namespace instead of the OleDb namespace, e.g. SqlConnection instead of OleDbConnection. As for the connection string, all connection strings can be found at ConnectionStrings.com - Forgot that connection string? Get it here!.
 
Back
Top