Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: link table , I find it
Hi Guys ,
I found the solution for linking an oracle attached table in ms-access :
Dim db As Database Dim tdef As TableDef Dim strConnect As String Set db = CurrentDb() strConnect = "ODBC;FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\youdsn.dsn;UID=userID;PWD=password" Set tdef = db.CreateTableDef("your_access_table") tdef.Connect = strConnect tdef.SourceTableName = "oracle_table_that needs_to_be_attached" db.TableDefs.Append tdef AttachTable_Exit: Exit Function AttachTable_Err: MsgBox "Error: " & Str(Err) & " - " & Error$ & " occured in global module." Resume AttachTable_Exit
End Function
3) You create a invisible form, set it in your startup and in the load event
you set following code :
Private Sub Form_Load()
Attach_Tbl.AttachTable
End Sub
4) When you quit your application you delete your attached tables
Thats it and it works fine.....
I 'm a little bit disappointed that The only answer I received was :
File->Get External Data->Link Tables
I 'm crying if I receive answers like that.....
Gerry Received on Thu Oct 30 2003 - 04:28:07 CST