# Re: how to use RDO access remote access97 database on windows NT server4.0?

Posted by LiuXuan on September 14, 1998 at 19:54:22:

In Reply to: how to use RDO access remote access97 database on windows NT server4.0? posted by yuan on September 14, 1998 at 17:06:19:

: hi
: good everybody
: On NTserver4.0 system:
: e:\db1.mdb(table:brance,code,address)
: I have set system dsn:
: yuan
: I ask that use RDO how to write program code on local system win95
: I use vb6.0 enterprise edition
: I want to add,delete,insert,update,query db1.mdb database
: my NT server4.0 machine:internaldata

: program code as follows:
: Option Explicit

: Public en As rdoEnvironment
: Public cn As rdoConnection

: Private Sub Form_Load()
: Dim scnct As String
: dim rs as rdoresultset
: Set en = rdoEngine.rdoEnvironments(0)
: scnct = "dsn=yuan;uid=;" & "pwd=;database=db1;"
: Set cn = en.OpenConnection(dsname:="yuan", _
: prompt:=rdDriverNoPrompt, ReadOnly:=False, Connect:=scnct)
: ssql="select * from branch"
: set rs=cn.openresult(ssql,rdopenkeyset)
: rs.addnew

: rs("branch_id")="2"
: rs("branch_branch_tep")="132421"
: rs.update
: While Not cn.EOF
: rs.MoveNext
: Wend
: rs.Close
: cn.Close

: End Sub

:
: i can't connect my server database ,how to do?
A error in your connect that you must set the
driver and the server

Follow Ups:

- Sir Who are you? why not to answer for me yuan 13:52:30 9/15/98 (0)