Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SELECT * INTO[Text;DATABASE...
All,
I am in EXCEL trying to use ADO to connect to an Oracle table and save the table as a text file. Here is the code I am attempting to use: Public Sub OracleExtracttoTXT() Dim cn As ADODB.Connection Dim sqlString As String Dim strConn As String Set cn = New ADODB.Connection strConn = "Driver={Oracle in instantclient10_1};" strConn = strConn & "DBQ=PROD;Uid=JDoe;Pwd=Doe5;" cn.Open strConn sqlString = "SELECT * INTO [Text;DATABASE=C:\Documents and Settings\JDoe\Desktop].[Test.txt] FROM GL_PERIODS" cn.Execute sqlString cn.Close Set cn = Nothing End Sub Excel shuts down on me everytime I run this. Any ideas what I am doing wrong? Thanks!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Possible to handle database insert, update and select in excel? | Excel Worksheet Functions | |||
select multiple records in database given conditions | Excel Worksheet Functions | |||
how do I select unique dates from a database in Excel? | Excel Worksheet Functions | |||
I can I select cells in a template and link it to a database? | Excel Discussion (Misc queries) | |||
select database | Excel Discussion (Misc queries) |