icedtea97
04-18-2004, 11:53 AM
hello everybody,
i'm using an ODBC connection. i have create a DSN database in the server.
the problem i'm facing now is, i can't connect to the server's database through client application.
my connection for server is like this:
Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
conn.Open "DSN=Test;uid=;pwd=;database=my.mdb"
Set cmd.ActiveConnection = conn
strSQL = "INSERT INTO original_table([name], age,[subject]) VALUES ('" & Replace$(name, " '", "' '") & "' , '" & age & "' , '" & Replace$(subject, " '", "' '") & "' ) "
cmd.CommandText = strSQL
rs.CursorLocation = adUseClient
rs.Open cmd, , adOpenStatic, adLockBatchOptimistic
how do i chnange the code in order to connect to the server's database through client application?
thanks,
icedtea97
i'm using an ODBC connection. i have create a DSN database in the server.
the problem i'm facing now is, i can't connect to the server's database through client application.
my connection for server is like this:
Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
conn.Open "DSN=Test;uid=;pwd=;database=my.mdb"
Set cmd.ActiveConnection = conn
strSQL = "INSERT INTO original_table([name], age,[subject]) VALUES ('" & Replace$(name, " '", "' '") & "' , '" & age & "' , '" & Replace$(subject, " '", "' '") & "' ) "
cmd.CommandText = strSQL
rs.CursorLocation = adUseClient
rs.Open cmd, , adOpenStatic, adLockBatchOptimistic
how do i chnange the code in order to connect to the server's database through client application?
thanks,
icedtea97