Re: Migrating From Access 2000 From SQL 2005 !

Tech-Archive recommends: Speed Up your PC by fixing your registry




<lovely_angel_for_you@xxxxxxxxx> wrote in message
news:1160753609.576539.53430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I used to use this string in VB6 while connecting to MS Access 2000

1)
Dim conn As ADODB.Connection
Dim rdset As ADODB.Recordset

Set conn = New ADODB.Connection
FilePath = App.Path & "\data.mdb"

With conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & FilePath & ";"
.Open
End With
Set rdset = New ADODB.Recordset

' In between use my queries like the following

rdset.Close
conn.Close

QR1
Set rdset = conn.Execute("Select Name From People Where City="MyCity'")

QR2
StrSQL = "Select Name From People Where City="MyCity'"
rdset.CursorType = 2
rdset.LockType = 3
rdset.Open StrSQL, conn
rdset.Fields("Name") = text1.text
rdset.Update

Now I am migrating to SQL 2005, Just wanted to know what will the new
string.

I know I need to use the connection string as

"Provider=SQLNCLI;Server=SVR1;Database=MY_DB;UID=sa;PWD=read;"

I am looking forward to the information on the same. Any help will be
greatly appreciated.

Love
Lovely


http://www.connectionstrings.com/

Also check out "Data Link" in the Windows Help (Start::Help) on how to
utilize a UDL file to build and test connection strings specific for your
problem domain.

-ralph


.



Relevant Pages

  • Re: Access project + VBA
    ... Currently developing a project in database. ... Dim conn As New ADODB.Connection ... Set conn = New ADODB.Connection ...
    (comp.databases.ms-access)
  • RE: Problem with ADO Code
    ... Set Conn = New ADODB.Connection ... Set rst = New ADODB.Recordset ... rst.Open "qryTotalSquareFeet", Conn, adOpenDynamic, adLockOptimistic ...
    (microsoft.public.access.formscoding)
  • Re: Connection Problem
    ... > Public Sub Connect ... Dim Conn As ADODB.Connection ... Set Conn = New ADODB.Connection ...
    (microsoft.public.vb.database.ado)
  • Re: Automatic Report
    ... Public Sub CheckProbs() ... Dim rsProblems as ADODB.Recordset ... Dim conn as ADODB.Connection ... Set conn = Current Project.Connection ...
    (microsoft.public.access.reports)
  • Problem with ADO Code
    ... I am trying to update a query with pricing after a level of 100sq ft is ... Dim Conn As ADODB.Connection ... Set Conn = New ADODB.Connection ...
    (microsoft.public.access.formscoding)