Jacksparrow87
Technical User
Hi people
I was hoping someone out there could offer me some help please, basically I’m in the early stages of moving from Access to SQL, I got one of my colleagues to convert the database and he’s changed it to SQL 2000 and he’s given me the network path of where the converted database is.
I’ve looked on and the most obvious connection string I need to use is OLE DB, OleDbConnection (.NET) as that’s is the connection I have used, but for some reason it’s not working on my application.
For example I have the following coding:
Now the above coding works perfect, my colleague told me that he has converted the database and asked me if I could test to see if it works or not. He said he’s created an SQL Server 2000 Database on W23-dbserver\supporttest
Well my connection is:
And the connection I think I need to use is:
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI
So I have tried the following:
Anyone know where I have gone wrong? When I run the coding it breaks on the adapter.fill line with the following error:
Any help please?
I was hoping someone out there could offer me some help please, basically I’m in the early stages of moving from Access to SQL, I got one of my colleagues to convert the database and he’s changed it to SQL 2000 and he’s given me the network path of where the converted database is.
I’ve looked on and the most obvious connection string I need to use is OLE DB, OleDbConnection (.NET) as that’s is the connection I have used, but for some reason it’s not working on my application.
For example I have the following coding:
Code:
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Application.StartupPath & "\CNS.mdb")
Dim adapter As New OleDbDataAdapter("Select * from Log Order By LogNumber DESC, NoteNumber DESC; ", conn)
Dim dt As New DataTable("Log")
adapter.Fill(dt)
dglog.DataSource() = dt
dt.DefaultView.AllowNew = False
Now the above coding works perfect, my colleague told me that he has converted the database and asked me if I could test to see if it works or not. He said he’s created an SQL Server 2000 Database on W23-dbserver\supporttest
Well my connection is:
Code:
"Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Application.StartupPath & "\CNS.mdb"
And the connection I think I need to use is:
Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI
So I have tried the following:
Code:
Provider=sqloledb;Data Source= W23-dbserver\supporttest;Initial Catalog= supporttest;Integrated Security=SSPI
Anyone know where I have gone wrong? When I run the coding it breaks on the adapter.fill line with the following error:
Code:
[DBNETLIB][ConnectionOpen (Connect())).]SQL Server does not exist or access denied
Any help please?