Home > Software engineering >  VB to connect to a remote database error
VB to connect to a remote database error

Time:10-12

I'm on my home computer to create a SQL database, test the connection in my house, was a success! But I got someone's home test, but showed be access denied!!! A hyphen is: Public db As New ADODB database Connection 'statement Connection object
Public rs As New ADODB. You 'statement As object in the future
Public Sub SJK 'connect to the database (db) process
The ConnectionString="provider=msdasql; SQL server driver={}; Server=\ SQLEXPRESS XP - 2012051252; Uid=sa; The PWD=UFO1428; The database=A123 "
The Open
End Sub

CodePudding user response:

CodePudding user response:

The connection string to be modified, the other have installed SQL server, and properly configured,

CodePudding user response:

reference 1st floor u011500825 response:

Could you detail how to modify

CodePudding user response:

refer to the second floor caozhy response:
connection string to be modified, and have installed SQL server, and properly configured,

Could you detail how to modify

CodePudding user response:

Your provider a mistake?

SQL Server2000 connection
'StrConn="Provider=SQLOLEDB. 1; Persist Security Info=False; User ID=develop; Password=12345; Data Source=ServerName "

CodePudding user response:

 Public db As New ADODB. Connection 'statement database Connection object 
Public rs As New ADODB. You 'statement As object in the future
Public Sub SJK 'connect to the database (db) process
The ConnectionString="Provider=SQLOLEDB. 1; Password=UFO1428; Persist Security Info=True; User ID=sa; Initial Catalog=A123; Computer IP Data Source="
The Open


CodePudding user response:

The connectionstring="driver=SQL Server; Server=computer name or IP address; Uid=SA; The PWD=SA password; Database database name="

CodePudding user response:

Server=XP - 2012051252

====================

Are you sure the computer name?

CodePudding user response:

Can you look at his computer on ping directly to your computer?

CodePudding user response:

The computer name, sqlsever passwords are the same? Can't simply blunt!

CodePudding user response:

Don't consider the database connection, your home computer, even on the wan? What is the IP address you know? In the place of your test, can you Ping?
If you can spell, try the IP address as the server name that your connection.

CodePudding user response:

You use a computer database, the other computer connection in the name of the computer name is the same as you
  • Related