via Excel 2003 vba I made dsn connection by this method
Sub CreateDataSourceFile()
Set fso = CreateObject("Scripting.FileSystemObject")
Set txtfile = fso.CreateTextFile("C:\program files\Common Files\ODBC\Data Sources\" & Me.cnnName & ".dsn", True)
txtfile.WriteLine ("[ODBC]")
txtfile.WriteLine ("DBQ=" & Me.DBFolderName)
txtfile.WriteLine (Me.DBFolderName)
txtfile.WriteLine ("DefaultDir=C:\")
txtfile.WriteLine ("Driver={Driver do Microsoft Access (*.mdb)}")
txtfile.WriteLine ("DriverId = 25")
txtfile.WriteLine ("FIL=MS Access")
txtfile.WriteLine ("MaxBufferSize = 2048")
txtfile.WriteLine ("MaxScanRows = 8")
txtfile.WriteLine ("PageTimeout = 5")
txtfile.WriteLine ("SafeTransactions = 0")
txtfile.WriteLine ("Threads = 3")
txtfile.WriteLine ("UserCommitSync = Yes")
txtfile.WriteLine ("[Microsoft Office]")
txtfile.WriteLine ("DefaultTable =" & Me.cnnName)
txtfile.Close
End Sub
now the issue is when Microsoft Query editor is opened for my connection it automatically add the default table to the editor, what I need is to have all tables in the data base added automatically?
is this available?! is there a way to do this by editing the dsn file?
any way, if any one can help me with this I will be thank full for him.
Have a nice day & thank you for reading,