How to open a MSAccess database?

How to open a MSAccess database?

Anonymous
Not applicable
320 Views
5 Replies
Message 1 of 6

How to open a MSAccess database?

Anonymous
Not applicable
Hi I need help in finding the code to open an instance of microsoft access (office 97) with an existing database open, all from within autocad? My file is named .... c:\data\mydatabase.mdb PS I am using ADT2004 Thanks Nigel Downing Design nigeld@actrix.co.nz
0 Likes
321 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Private Sub ExportToAccessTable() Dim rs As New ADODB.Recordset Dim rsins As New ADODB.Recordset Dim sSQL As String Dim sINSSQL As String Dim rsretval As RecordStatus Dim i As Integer Dim cn As New ADODB.Connection Dim sConnStr As String Dim dConvert As Double ' -- open database connection On Error Resume Next If LOGIN_PASSWORD <> vbNullString And LOGIN_USERNAME <> vbNullString Then sConnStr = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & txtExportAccess.Text & ";Uid=Admin;Pwd=" & LOGIN_PASSWORD & ";" Else sConnStr = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & txtExportAccess.Text & ";Uid=Admin;Pwd=;" End If frmExport.MousePointer = vbHourglass Do Until cn.State = adStateOpen Or CANCEL_LOGIN = 1 cn.CursorLocation = adUseClient cn.Open sConnStr If Err.Description = "[Microsoft][ODBC Microsoft Access Driver] Not a valid password." Then frmLogin.txtPassword.Text = LOGIN_PASSWORD frmLogin.txtUsername.Text = "Admin" frmLogin.txtUsername.Locked = True frmLogin.Show vbModal, Me Err.Clear sConnStr = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & txtExportAccess.Text & ";Uid=Admin;Pwd=" & LOGIN_PASSWORD & ";" ElseIf Err Then MsgBox Err.Description CANCEL_LOGIN = 1 End If Loop If CANCEL_LOGIN = 1 Then CANCEL_LOGIN = 0 txtExportAccess.Text = vbNullString Exit Sub End If ' #-- insert data -- # sINSSQL = "INSERT INTO " & cboAccessTable.Text & " " Hope that gets you started. Dave "Nigel Downing" wrote in message news:3fe4dd3d_7@statler... > Hi > > I need help in finding the code to open an instance of microsoft access > (office 97) with an existing database open, all from within autocad? > My file is named .... c:\data\mydatabase.mdb > > PS I am using ADT2004 > > Thanks > Nigel Downing Design > nigeld@actrix.co.nz > >
0 Likes
Message 3 of 6

Anonymous
Not applicable
I just want to be able to open up access with an existing file. I dont need to open channels for data between autocad and access. I tried with autolisp (startapp "C:/Program Files/Microsoft Office/Office/MSACCESS.EXE") and got it opening access but couldnt get it to start with the file I want open.

Thanks
0 Likes
Message 4 of 6

Anonymous
Not applicable
Just create an object, select it, right-click and choose hyperlink. Browse to the mdb file. Then select it later and right click, hyperlink, open. Dave "NDDesign" wrote in message news:29870356.1071966155801.JavaMail.jive@jiveforum1.autodesk.com... > I just want to be able to open up access with an existing file. I dont need to open channels for data between autocad and access. I tried with autolisp (startapp "C:/Program Files/Microsoft Office/Office/MSACCESS.EXE") and got it opening access but couldnt get it to start with the file I want open. > > Thanks
0 Likes
Message 5 of 6

Anonymous
Not applicable
http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/31/pid/687/qid/676242 "Dave" wrote in message news:3fe568e1$1_2@statler... > Just create an object, select it, right-click and choose hyperlink. Browse > to the mdb file. Then select it later and right click, hyperlink, open. > > Dave > > "NDDesign" wrote in message > news:29870356.1071966155801.JavaMail.jive@jiveforum1.autodesk.com... > > I just want to be able to open up access with an existing file. I dont > need to open channels for data between autocad and access. I tried with > autolisp (startapp "C:/Program Files/Microsoft Office/Office/MSACCESS.EXE") > and got it opening access but couldnt get it to start with the file I want > open. > > > > Thanks > >
0 Likes
Message 6 of 6

Anonymous
Not applicable
(startapp "C:/Program Files/Microsoft Office/Office/MSACCESS.EXE" "c:\data\mydatabase.mdb") "Dave" wrote in message news:3fe56be9_4@statler... > http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/31/pid/687/qid/676242 > > "Dave" wrote in message > news:3fe568e1$1_2@statler... > > Just create an object, select it, right-click and choose hyperlink. Browse > > to the mdb file. Then select it later and right click, hyperlink, open. > > > > Dave > > > > "NDDesign" wrote in message > > news:29870356.1071966155801.JavaMail.jive@jiveforum1.autodesk.com... > > > I just want to be able to open up access with an existing file. I dont > > need to open channels for data between autocad and access. I tried with > > autolisp (startapp "C:/Program Files/Microsoft > Office/Office/MSACCESS.EXE") > > and got it opening access but couldnt get it to start with the file I want > > open. > > > > > > Thanks > > > > > >
0 Likes