Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfquerying textfile

Status
Not open for further replies.

mansii

Programmer
Oct 18, 2002
641
ID
I am trying to use a DSNless connection with the following infos:

Design mode Environment:
CF 5.0
WinXP

RB1101.txt:
Fld1,Fld2,Fld3
01,010,001
Current script:
Code:
<cfset conStr = "Driver={Microsoft Text Driver(*.txt;*.csv)}; Dbq=#expandpath('Upload/P11')#;Extensions=csv,txt;Persist Security Info=False;">
<cfoutput>#conStr#
    <cfquery name="RB" DBType="dynamic" ConnectString="#conStr#">
        SELECT *
        FROM RB1101
    </cfquery>
</cfoutput>

Result:
Code:
conStr: Driver={Microsoft Text Driver (*.txt;*.csv)};Dbq=c:\inetpub\[URL unfurl="true"]wwwroot\Main\Sailing\Upload\P11;Extensions=csv,txt;Persist[/URL] Security Info=False;
which exactly matches the data folder where RB1101.txt resides.

Error message:
[blue]
ODBC Error Code = IM002 (Data source not found and no default driver specified)

[Microsoft][ODBC Driver Manager] Data source '' not found and no default driver specified
[/blue]

Could anyone please tell what I am missing here?

TIA
mansii
 
Sorry, guys. I need to bump this.
Anyone? Any hint?

mansii
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top