I am a newbie trying to connect a MS Access Appln (currently connected to an external Access database) to a remote SQL Server 2005. To make it easier to distribute to a large audience want to make it DSN-less.
I could connect to local Access db with following connection string
DbFullName = CurrentProject.Path & "\" & "project_DB.accdb"
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DbFullName & ";Jet OLEDB:Database Password=pwd;"
for the SQL Server 2005 connection, when i tried following command,
"Data Source=myserverdev;Initial Catalog=project_DBSQL;Persist Security Info=True;User ID=msaccess_cbd;Password=Paci0113"
providerName = "System.Data.SqlClient"
I get the error-
datasourcename not found and device driver not found
I tried to get connected with SQL server through DSN-less connection through VB but I failed.The code which I tried is:-
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\IP address\databasename;User ID=username;Password=pwd;
error message i got was :
end of line expected
Please suggest me some way to solve this.