Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook to which I want to return the database names residing in a
specific SQL database. I need the names in order to allow a user to choose a database name. This name will then be inserted into a connection string designed to import the data from the indicated database. I am pasting in the basic connection string used once the database name is known. Also, if anyone knows how to translate this string into one that doesn't use the array of arrays format... Thanks in advance, Mike ActiveSheet.QueryTables.Add(Connection:=Array(Arra y( _ "ODBC;DRIVER=SQL Server;SERVER=CONTROLSERV001\WINCC;UID=;APP=Micros oft Office XP;WSID=THE_MAN;DATABASE=CONTROLSERV001_H2gen#pc1_ TLG_S" _ ), Array("_200409171428;Trusted_Connection=Yes")), Destination:=Range("A1")) .CommandText = Array( _ "SELECT Archive.ValueName, TagUncompressed.TimeStamp, TagUncompressed.RealValue" & Chr(13) & "" & Chr(10) & "FROM ""CONTROLSERV001_H2gen#pc1_TLG_S_200409171428"".db o.Archive Archive, ""CONTROLSERV001_H2gen#pc1_TLG_S_200409171428"".db " _ , _ "o.TagUncompressed TagUncompressed" & Chr(13) & "" & Chr(10) & "WHERE Archive.ValueID = TagUncompressed.ValueID" & Chr(13) & "" & Chr(10) & "ORDER BY Archive.ValueName, TagUncompressed.TimeStamp" _ ) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
return a list of names, from a large list of repeated names. | Excel Worksheet Functions | |||
How do I change column heading names in Excel database spreadsheet | Excel Discussion (Misc queries) | |||
Merge two spreadsheets with names database then search for duplica | Excel Discussion (Misc queries) | |||
DCOUNT to Return Values from Access database | Excel Discussion (Misc queries) | |||
How do I build a database of names and addresses? | Excel Discussion (Misc queries) |