Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am currently writing a program in Excel that will take data off of a SQL
server and dump it into an excel spreadsheet so that i can crunch numbers and display the information. I used an access database with dummy information to work on crunching the numbers because the serverwas not set up yet, but now i want to grab the data off of the database we set up on the server instead of the access file. i used a JET object to grab the data from the access file, but i am having quite a hard time getting the data off of the server. this is the code i used for the Access: Set myConn = New ADODB.Connection Set myRec = New ADODB.Recordset myConn.Provider = "Microsoft.jet.oledb.4.0" myConn.Open "\\yodisk2\shryork\tober\glassing1.mdb" This is the code I am attempting to use for the SQL: myConn.Provider = "SQLOLEDB.1" myConn.ConnectionString= "DATABASE=glassPLC1;SERVER=yosql1;" I am not sure why this is not working. Any advice would be greatly appreciated. Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Jason wrote: I am currently writing a program in Excel that will take data off of a SQL server and dump it into an excel spreadsheet so that i can crunch numbers and display the information. I used an access database with dummy information to work on crunching the numbers because the serverwas not set up yet, but now i want to grab the data off of the database we set up on the server instead of the access file. i used a JET object to grab the data from the access file, but i am having quite a hard time getting the data off of the server. this is the code i used for the Access: Set myConn = New ADODB.Connection Set myRec = New ADODB.Recordset myConn.Provider = "Microsoft.jet.oledb.4.0" myConn.Open "\\yodisk2\shryork\tober\glassing1.mdb" This is the code I am attempting to use for the SQL: myConn.Provider = "SQLOLEDB.1" myConn.ConnectionString= "DATABASE=glassPLC1;SERVER=yosql1;" I am not sure why this is not working. Any advice would be greatly appreciated. Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Jason wrote: This is the code I am attempting to use for the SQL: myConn.Provider = "SQLOLEDB.1" myConn.ConnectionString= "DATABASE=glassPLC1;SERVER=yosql1;" Try changing DATABASE to INITIAL CATALOG. Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How To Access Thru News Server | Excel Discussion (Misc queries) | |||
Connect to Access Database On Remote Server | Excel Discussion (Misc queries) | |||
Export from Access/SQL Server | Excel Discussion (Misc queries) | |||
How do I access data stored in a SQL server for vlookup function? | Excel Worksheet Functions | |||
ado connection to access vs. sql server? | Excel Programming |