Hi everyone. I am trying to connect using ADODB to an SQL server database which is located on a network at work. The connection string has 2 paramaters: Server_name and database_name. Is Server_name the full network address and database_name merely the database name? For example,
Server_name="\\101.245.23.8\SQL" ( which is the network address plus the name of the computer(SQL))
Also when connecting to the sql database from the machine directly, I tried opening a recordset using the statement:
tbl.Open "Select * from Teachers WHERE TeacherCode='" & CurrentUser & "'", cn, adOpenKeyset, adLockPessimistic (this works fine with an Access database)
but got an error message that the data type 'text' I used for CurrentUser(its value is "KRA") does not allow assigning the equals(=) sign.
Anyone able to help? It would be greatly appreciated.
Tim Christopher
Server_name="\\101.245.23.8\SQL" ( which is the network address plus the name of the computer(SQL))
Also when connecting to the sql database from the machine directly, I tried opening a recordset using the statement:
tbl.Open "Select * from Teachers WHERE TeacherCode='" & CurrentUser & "'", cn, adOpenKeyset, adLockPessimistic (this works fine with an Access database)
but got an error message that the data type 'text' I used for CurrentUser(its value is "KRA") does not allow assigning the equals(=) sign.
Anyone able to help? It would be greatly appreciated.
Tim Christopher