RE: ODBC and cvs files

2002-04-09 Thread Jim Curran

I think, but not positive, that each file in the directory refers to a
table.  So, in CF,

select Name
from test1

- j



-Original Message-
From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 1:49 PM
To: CF-Talk
Subject: ODBC and cvs files


Hi friends:
I'm trying to make a query from a csv file
(test1.csv).
The way I thought was to make an ODBC entry for text
files . In the ODBC entry I only can specify the
directory not the file name.
So I guessed I had to include that in the final query.
There is something I'm missing .
I will appreciate your help.Any new ideas could be
great too.
Down the code and what I see in my browser .
Thanks for any help
Mario

//my code
cfquery name=InstrLedAttQuery
datasource=EkOutsideFiles dbtype=ODBC
 SELECT * FROM test1.cvs
/cfquery

//What I get in my browser
Error Diagnostic Information
ODBC Error Code = 42000 (Syntax error or access
violation)

[Microsoft][ODBC Text Driver] Cannot update. Database
or object is read-only.

The error occurred while processing an element with a
general identifier of (CFQUERY), occupying document
position (199:1) to (199:75).

Date/Time: 03/11/02 12:20:20
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
NT 5.0)
Remote Address: 66.109.35.50


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC and cvs files

2002-04-09 Thread Tony_Petruzzi

you could also use the querynew() to create a query from a delimeted list.

cfscript
mylist = tony, charles, greg, mia, kthy, dad, cliff;
myQuery = QueryNew(names);
x = ListLen(mylist, ',');
newrows = QueryAddRow(myQuery, x);
for(i=1;i LTE x;i=i+1){
temp = QuerySetCell(myQuery, names, ListGetAt(mylist, i,
','), i);
}
/cfscript

cfoutput query=myQuery
#names#br
/cfoutput

Anthony Petruzzi
Webmaster
954-321-4703
http://www.sheriff.org


-Original Message-
From: Jim Curran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 2:21 PM
To: CF-Talk
Subject: RE: ODBC and cvs files


I think, but not positive, that each file in the directory refers to a
table.  So, in CF,

select Name
from test1

- j



-Original Message-
From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 1:49 PM
To: CF-Talk
Subject: ODBC and cvs files


Hi friends:
I'm trying to make a query from a csv file
(test1.csv).
The way I thought was to make an ODBC entry for text
files . In the ODBC entry I only can specify the
directory not the file name.
So I guessed I had to include that in the final query.
There is something I'm missing .
I will appreciate your help.Any new ideas could be
great too.
Down the code and what I see in my browser .
Thanks for any help
Mario

//my code
cfquery name=InstrLedAttQuery
datasource=EkOutsideFiles dbtype=ODBC
 SELECT * FROM test1.cvs
/cfquery

//What I get in my browser
Error Diagnostic Information
ODBC Error Code = 42000 (Syntax error or access
violation)

[Microsoft][ODBC Text Driver] Cannot update. Database
or object is read-only.

The error occurred while processing an element with a
general identifier of (CFQUERY), occupying document
position (199:1) to (199:75).

Date/Time: 03/11/02 12:20:20
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
NT 5.0)
Remote Address: 66.109.35.50


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: ODBC and cvs files

2002-04-09 Thread Marlon Moyer

Just a stab in the dark, but did you make sure test1.cvs is not marked read
only in the file system?

Marlon

- Original Message -
From: Mario Martinez R. [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 12:48 PM
Subject: ODBC and cvs files


 Hi friends:
 I'm trying to make a query from a csv file
 (test1.csv).
 The way I thought was to make an ODBC entry for text
 files . In the ODBC entry I only can specify the
 directory not the file name.
 So I guessed I had to include that in the final query.
 There is something I'm missing .
 I will appreciate your help.Any new ideas could be
 great too.
 Down the code and what I see in my browser .
 Thanks for any help
 Mario

 //my code
 cfquery name=InstrLedAttQuery
 datasource=EkOutsideFiles dbtype=ODBC
  SELECT * FROM test1.cvs
 /cfquery

 //What I get in my browser
 Error Diagnostic Information
 ODBC Error Code = 42000 (Syntax error or access
 violation)

 [Microsoft][ODBC Text Driver] Cannot update. Database
 or object is read-only.

 The error occurred while processing an element with a
 general identifier of (CFQUERY), occupying document
 position (199:1) to (199:75).

 Date/Time: 03/11/02 12:20:20
 Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
 NT 5.0)
 Remote Address: 66.109.35.50


 _
 Do You Yahoo!?
 Información de Estados Unidos y América Latina, en Yahoo! Noticias.
 Visítanos en http://noticias.espanol.yahoo.com
 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: ODBC and cvs files

2002-04-09 Thread Mario Martinez R.

I gave access to everyone user to the folder where the
file is holded , and the file is not read only either.
When I test the ODBC conecction through the CF
Administrator page it works . I must have had
something wrong but I can figure out what is going on.
Any help would be appreciated.
Mario

 --- Marlon Moyer [EMAIL PROTECTED] escribió: 
Just a stab in the dark, but did you make sure
 test1.cvs is not marked read
 only in the file system?
 
 Marlon
 
 - Original Message -
 From: Mario Martinez R. [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Tuesday, April 09, 2002 12:48 PM
 Subject: ODBC and cvs files
 
 
  Hi friends:
  I'm trying to make a query from a csv file
  (test1.csv).
  The way I thought was to make an ODBC entry for
 text
  files . In the ODBC entry I only can specify the
  directory not the file name.
  So I guessed I had to include that in the final
 query.
  There is something I'm missing .
  I will appreciate your help.Any new ideas could be
  great too.
  Down the code and what I see in my browser .
  Thanks for any help
  Mario
 
  //my code
  cfquery name=InstrLedAttQuery
  datasource=EkOutsideFiles dbtype=ODBC
   SELECT * FROM test1.cvs
  /cfquery
 
  //What I get in my browser
  Error Diagnostic Information
  ODBC Error Code = 42000 (Syntax error or access
  violation)
 
  [Microsoft][ODBC Text Driver] Cannot update.
 Database
  or object is read-only.
 
  The error occurred while processing an element
 with a
  general identifier of (CFQUERY), occupying
 document
  position (199:1) to (199:75).
 
  Date/Time: 03/11/02 12:20:20
  Browser: Mozilla/4.0 (compatible; MSIE 5.01;
 Windows
  NT 5.0)
  Remote Address: 66.109.35.50
 
 
 

_
  Do You Yahoo!?
  Información de Estados Unidos y América Latina, en
 Yahoo! Noticias.
  Visítanos en http://noticias.espanol.yahoo.com
  


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: ODBC and cvs files

2002-04-09 Thread Marlon Moyer

Mario,

I also noticed that you have the file named test.csv in one place and
test.cvs in another place.  Other than that, I'm not sure what could be
wrong.  You are correct in calling the filename in the query ie. 'select *
from test.csv'


- Original Message -
From: Mario Martinez R. [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 3:13 PM
Subject: Re: ODBC and cvs files


 I gave access to everyone user to the folder where the
 file is holded , and the file is not read only either.
 When I test the ODBC conecction through the CF
 Administrator page it works . I must have had
 something wrong but I can figure out what is going on.
 Any help would be appreciated.
 Mario

  --- Marlon Moyer [EMAIL PROTECTED] escribió: 
 Just a stab in the dark, but did you make sure
  test1.cvs is not marked read
  only in the file system?
 
  Marlon
 
  - Original Message -
  From: Mario Martinez R. [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Tuesday, April 09, 2002 12:48 PM
  Subject: ODBC and cvs files
 
 
   Hi friends:
   I'm trying to make a query from a csv file
   (test1.csv).
   The way I thought was to make an ODBC entry for
  text
   files . In the ODBC entry I only can specify the
   directory not the file name.
   So I guessed I had to include that in the final
  query.
   There is something I'm missing .
   I will appreciate your help.Any new ideas could be
   great too.
   Down the code and what I see in my browser .
   Thanks for any help
   Mario
  
   //my code
   cfquery name=InstrLedAttQuery
   datasource=EkOutsideFiles dbtype=ODBC
SELECT * FROM test1.cvs
   /cfquery
  
   //What I get in my browser
   Error Diagnostic Information
   ODBC Error Code = 42000 (Syntax error or access
   violation)
  
   [Microsoft][ODBC Text Driver] Cannot update.
  Database
   or object is read-only.
  
   The error occurred while processing an element
  with a
   general identifier of (CFQUERY), occupying
  document
   position (199:1) to (199:75).
  
   Date/Time: 03/11/02 12:20:20
   Browser: Mozilla/4.0 (compatible; MSIE 5.01;
  Windows
   NT 5.0)
   Remote Address: 66.109.35.50
  
  
  
 
 _
   Do You Yahoo!?
   Información de Estados Unidos y América Latina, en
  Yahoo! Noticias.
   Visítanos en http://noticias.espanol.yahoo.com
  
 

 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC and cvs files

2002-04-09 Thread David DiPietro

This is how I do it

cfset RostersOut='#session.userID#''PreceptorRosters.csv'
cfset RostersFile='DriveLetter:\Path\Path\Path\Path\#RostersOut#'
cfset RostersPath='\Path\Path\Path\Path\#RostersOut#'
cfset RostersFileName='#RostersOut#'

form action='../GeneratedFiles/#RostersFileName#' method=Get target=_Self
enablecab=No
input type='hidden' name='file' value='#RostersPath#'
input type=Submit value = Send #RostersOut# File to Excel
/form

cfset toutput=something1,something2,something3
CFFILE ACTION=Write FILE=#RostersFile# OUTPUT=#toutput# ADDNEWLINE=Yes
cfset toutput =
'#attributes.something1#,#attributes.something2#,#attributes.something3#'
CFFILE ACTION=Append FILE=#RostersFile# OUTPUT=#toutput# ADDNEWLINE=Yes

The user then clicks the form button and it appears
HIH
David

-Original Message-
From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 1:49 PM
To: CF-Talk
Subject: ODBC and cvs files


Hi friends:
I'm trying to make a query from a csv file
(test1.csv).
The way I thought was to make an ODBC entry for text
files . In the ODBC entry I only can specify the
directory not the file name.
So I guessed I had to include that in the final query.
There is something I'm missing .
I will appreciate your help.Any new ideas could be
great too.
Down the code and what I see in my browser .
Thanks for any help
Mario

//my code
cfquery name=InstrLedAttQuery
datasource=EkOutsideFiles dbtype=ODBC
 SELECT * FROM test1.cvs
/cfquery

//What I get in my browser
Error Diagnostic Information
ODBC Error Code = 42000 (Syntax error or access
violation)

[Microsoft][ODBC Text Driver] Cannot update. Database
or object is read-only.

The error occurred while processing an element with a
general identifier of (CFQUERY), occupying document
position (199:1) to (199:75).

Date/Time: 03/11/02 12:20:20
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
NT 5.0)
Remote Address: 66.109.35.50


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC and cvs files

2002-04-09 Thread David DiPietro

Oops The datasource thing is what you're after.
Sorry

-Original Message-
From: David DiPietro [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 4:37 PM
To: CF-Talk
Subject: RE: ODBC and cvs files


This is how I do it

cfset RostersOut='#session.userID#''PreceptorRosters.csv'
cfset RostersFile='DriveLetter:\Path\Path\Path\Path\#RostersOut#'
cfset RostersPath='\Path\Path\Path\Path\#RostersOut#'
cfset RostersFileName='#RostersOut#'

form action='../GeneratedFiles/#RostersFileName#' method=Get target=_Self
enablecab=No
input type='hidden' name='file' value='#RostersPath#'
input type=Submit value = Send #RostersOut# File to Excel
/form

cfset toutput=something1,something2,something3
CFFILE ACTION=Write FILE=#RostersFile# OUTPUT=#toutput# ADDNEWLINE=Yes
cfset toutput =
'#attributes.something1#,#attributes.something2#,#attributes.something3#'
CFFILE ACTION=Append FILE=#RostersFile# OUTPUT=#toutput# ADDNEWLINE=Yes

The user then clicks the form button and it appears
HIH
David

-Original Message-
From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 1:49 PM
To: CF-Talk
Subject: ODBC and cvs files


Hi friends:
I'm trying to make a query from a csv file
(test1.csv).
The way I thought was to make an ODBC entry for text
files . In the ODBC entry I only can specify the
directory not the file name.
So I guessed I had to include that in the final query.
There is something I'm missing .
I will appreciate your help.Any new ideas could be
great too.
Down the code and what I see in my browser .
Thanks for any help
Mario

//my code
cfquery name=InstrLedAttQuery
datasource=EkOutsideFiles dbtype=ODBC
 SELECT * FROM test1.cvs
/cfquery

//What I get in my browser
Error Diagnostic Information
ODBC Error Code = 42000 (Syntax error or access
violation)

[Microsoft][ODBC Text Driver] Cannot update. Database
or object is read-only.

The error occurred while processing an element with a
general identifier of (CFQUERY), occupying document
position (199:1) to (199:75).

Date/Time: 03/11/02 12:20:20
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
NT 5.0)
Remote Address: 66.109.35.50


_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC and cvs files

2002-04-09 Thread Mario Martinez R.

Thanks to all of you for your concern.
I found which is the root of my problem although I
don't know what is happening.
If I change the extension of the cvs file and make it
a txt file everything runs perfect.
I have to modify the query like it's down here.
cfquery name=InstrLedAttQuery
 datasource=EkOutsideFiles dbtype=ODBC
  SELECT * FROM test1.txt
 /cfquery
Why??. I don't know , but perhaps some of you must. 
I realized that if I write SELECT * FROM test1 it
assume I'm talking about a txt file. That's why I came
to this dark point.
Thank you all
Mario



 --- David DiPietro
[EMAIL PROTECTED] escribió: 
Oops The datasource thing is what you're after.
 Sorry
 
 -Original Message-
 From: David DiPietro
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 09, 2002 4:37 PM
 To: CF-Talk
 Subject: RE: ODBC and cvs files
 
 
 This is how I do it
 
 cfset

RostersOut='#session.userID#''PreceptorRosters.csv'
 cfset

RostersFile='DriveLetter:\Path\Path\Path\Path\#RostersOut#'
 cfset
 RostersPath='\Path\Path\Path\Path\#RostersOut#'
 cfset RostersFileName='#RostersOut#'
 
 form action='../GeneratedFiles/#RostersFileName#'
 method=Get target=_Self
 enablecab=No
   input type='hidden' name='file'
 value='#RostersPath#'
   input type=Submit value = Send #RostersOut#
 File to Excel
 /form
 
 cfset toutput=something1,something2,something3
 CFFILE ACTION=Write FILE=#RostersFile#
 OUTPUT=#toutput# ADDNEWLINE=Yes
 cfset toutput =

'#attributes.something1#,#attributes.something2#,#attributes.something3#'
 CFFILE ACTION=Append FILE=#RostersFile#
 OUTPUT=#toutput# ADDNEWLINE=Yes
 
 The user then clicks the form button and it appears
 HIH
 David
 
 -Original Message-
 From: Mario Martinez R. [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 09, 2002 1:49 PM
 To: CF-Talk
 Subject: ODBC and cvs files
 
 
 Hi friends:
 I'm trying to make a query from a csv file
 (test1.csv).
 The way I thought was to make an ODBC entry for text
 files . In the ODBC entry I only can specify the
 directory not the file name.
 So I guessed I had to include that in the final
 query.
 There is something I'm missing .
 I will appreciate your help.Any new ideas could be
 great too.
 Down the code and what I see in my browser .
 Thanks for any help
 Mario
 
 //my code
 cfquery name=InstrLedAttQuery
 datasource=EkOutsideFiles dbtype=ODBC
  SELECT * FROM test1.cvs
 /cfquery
 
 //What I get in my browser
 Error Diagnostic Information
 ODBC Error Code = 42000 (Syntax error or access
 violation)
 
 [Microsoft][ODBC Text Driver] Cannot update.
 Database
 or object is read-only.
 
 The error occurred while processing an element with
 a
 general identifier of (CFQUERY), occupying document
 position (199:1) to (199:75).
 
 Date/Time: 03/11/02 12:20:20
 Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
 NT 5.0)
 Remote Address: 66.109.35.50
 
 

_
 Do You Yahoo!?
 Información de Estados Unidos y América Latina, en
 Yahoo! Noticias.
 Visítanos en http://noticias.espanol.yahoo.com
 
 


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists