hi mark,
i have attached a sample of the db file (.txt) at the bottom of the mail. it has 20
fields for each record, but when tested for the
number of fields with the Rs.Fields.Count, it returns 2.
(here is the code)
--cut--
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
' debug test
'Response.write "Driver={Microsoft Text Driver (*.txt; *.csv)};" & "DBQ=" &
Server.MapPath("..") & "\data\publication\unzipped\;" &
"Extensions=asc,csv,tab,txt,mer"
conn.Open "DRIVER={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ=" & Server.MapPath("..") & "\data\publication\unzipped\;", "",
""
rs.open "SELECT * FROM adpfBiblio.txt", conn
response.write rs.fields.count
rs.close
conn.close
set rs=nothing
set conn=nothing
--cut--
i think the problem is that i'm assuming that the text driver properties defaults to :
'"' for text delimiters, ';' for field
delimiters and lfcr for end of row
can i specifi this in my conn string or does it have to be done using the scheme.ini
Thanks
Tim
--data--
Titre;Edition;Collection;Description;R�f�rence;Prix;Nombre_de_pages;Date_parution;Th�me;Rubrique;Type;Nombre_de_volumes;Coffret;Impo
rtance;Traduction,_langue;Identifiant;Th�me2;Rubrique2;Th�me3;Rubrique3;SaisiePar;Source
"Itin�raire du patrimoine";"�d. du Patrimoine";"coll. � Itin�raire du patrimoine
�";"ill. noir et coul.";"";"39
F";"";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1008";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Voyage au Cambodge. L�architecture khmer";"Maisonneuve et Larose";"";"ill.
noir";"ISBN : 2-7068-1374-1";"190 F";"462
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1009";"";"";"";"";"c�line";"vient
de para�tre N�2"
"L�Invention du b�ton arm�. Hennebique 1890-1914";"Norma";"";"";"ISBN :
2-909283-46-1";"160 F";"345
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1010";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Le Grand Louvre. De la Pyramide � l�Orangerie";"Le Moniteur ";"";"ill. noir et
coul.";"ISBN : 2-281-19110-9";"245 F";"216
p";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1011";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Le B�ton � Paris";"Pavillon de l�Arsenal, Picard";"";"ill. noir et coul.";"ISBN :
2-7084-0559-4.";"230 F";"224
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1012";"";"";"";"";"c�line";"vient
de para�tre N�2"
"L�Effondrement de la Tr�s Grande Biblioth�que de France. Ses causes, ses
cons�quenses";"�d. de l�Encyclop�die des
nuisances";"";"";"ISBN : 2-910386-10-4";"75 F";"130
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1013";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Regards sur l�immeuble priv�. Architecture d�un habitat
(1880-1970)";"Le Moniteur";"";"ill. noir";"ISBN : 2-281-19103-6";"230 F";"227
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1014";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Les Grandes Dates de l�architecture en Europe de 1850 � nos jours";"PUF";"coll. � Que
sais-je ? �, no 3439";"";"ISBN :
2-13-049649-0";"42 F";"126
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1015";"";"";"";"";"c�line";"vient
de
para�tre N�2"
"Architecture et Modestie";"Th��t�te �ditions";"";"ill. noir";"ISBN :
2-912860-12-1";"100 F";"97
p.";"2000";"Architecture";"ARCHITECTURE";"livre";"";"";"";"";"1016";"";"";"";"";"c�line";"vient
de para�tre N�2"
"La Mouvance. Du jardin au territoire, cinquante mots pour le paysage";"La
Villette";"";"ill. noir";"ISBN : 2-903539-49-9";"60
F";"95 p.";"2000";"Architecture";"JARDINS ET
PAYSAGES";"livre";"";"";"";"";"1017";"";"";"";"";"c�line";"vient de para�tre N�2"
"France, terre de paysages";"F. Hazan";"";"ill. coul.";"ISBN : 2-85025-675-7";"275
F";"57 p.";"2000";"Architecture";"JARDINS ET
PAYSAGES";"livre";"";"";"";"";"1018";"";"";"";"";"c�line";"vient de para�tre N�2"
"Paris, avenir de la France";"L�Aube
";"";"ill. noir";"ISBN : 2-87678-480-7";"120 F";"198
p.";"2000";"Architecture";"URBANISME";"livre";"";"";"";"";"1019";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Le Dessus des cartes : un atlas parisien";"Pavillon de l�Arsenal, Picard";"";"ill.
noir et coul.";"ISBN : 2-7084-0570-5";"330
F";"288
p.";"2000";"Architecture";"URBANISME";"livre";"";"";"";"";"1020";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Paris, biographie d�une capitale";"Hazan
";"";" ill. noir";"ISBN : 2-85025-671-4";"150 F";"268
p.";"2000";"Architecture";"URBANISME";"livre";"";"";"";"";"1021";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Changer la ville. Pour une nouvelle urbanit�";"Odile Jacob";"";"";"ISBN :
2-7381-0706-0";"125 F";"219
p.";"2000";"Architecture";"URBANISME";"livre";"";"";"";"";"1022";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Mon catalogue";"FRAC Limousin";"";"";"ISBN : 2-908257-24-6";"15O F";"non
pagin�";"2000";"Art";"";"livre";"";"";"";"";"1023";"";"";"";"";"c�line";"vient de
para�tre N�2"
"Mon grand-p�re";"Allia";"";"";"ISBN : 2-844885-009-X";"4O F";"64
p.";"2000";"Art";"";"livre";"";"";"";"";"1024";"";"";"";"";"c�line";"vient de para�tre
N�2"
"Lettres � Bettine";"Actes Sud";"";"";"ISBN : 2-7427-2391-9";"189 F";"624
p.";"2000";"Art";"";"livre";"";"";"";"";"1025";"";"";"";"";"c�line";"vient de para�tre
N�2"
"Mais comment taire mes commentaires ?";"ENSBA";"coll. � �crits d�artistes �";"";"ISBN
: 2-840 56-068-2";"1OO F";"27O
p.";"2000";"Art";"";"livre";"";"";"";"";"1026";"";"";"";"";"c�line";"vient de para�tre
N�2"
"Cinquante Esp�ces d�espace";"Centre Pompidou / Mus�es de Marseille /
RMN";"";"";"";"";"";"2000";"Art";"";"";"";"";"";"";"1027";"";"";"";"";"c�line";"vient
de para�tre N�2"
"Le Bo�tier de m�lancolie. La photographie en cent photographies";"Hazan";"";"";"ISBN
: 2-85025-672-2";"298 F";"214
p.";"2000";"Art";"";"livre";"";"";"";"";"1028";"";"";"";"";"c�line";"vient de para�tre
N�2"
"Comix 2000";"L�Association";"";"noir";"ISBN : 2-84414-022-X";"365 F";"2000
p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1029";"";"";"";"";"c�line";"vient de para�tre N�2"
"Sol�dango. Cand�labres, 1";"Delcourt";"";"coul.";"ISBN : 2-84055-256-6";"58 F";"48
p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1030";"";"";"";"";"c�line";"vient de para�tre N�2"
"Gen�se. Universal war one, 1";"Soleil";"";"coul.";"ISBN : 2-87764-807-9";"79 F";"46
p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1031";"";"";"";"";"c�line";"vient de para�tre N�2"
"Le R�ducteur de vitesse";"Dupuis";"coll. � Aire libre �";"coul.";"ISBN :
2-8001-2801-1";"79 F";"80 p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1032";"";"";"";"";"c�line";"vient de para�tre N�2"
"Blotch. Le roi de Paris";"Audie / Fluide Glacial";"";"noir";"ISBN :
2-85815-263-2";"54 F";"50 p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1033";"";"";"";"";"c�line";"vient de para�tre N�2"
"Le Mariage de monsieur Lakonik";"Mus�e de la Bande dessin�e";"coll. � Biblioth�que du
9e Art �";"bichromie";"ISBN :
2-907848-23-2";"95 F";"48 p.";"2000";"Bande
dessin�e";"";"livre";"";"";"";"";"1034";"";"";"";"";"c�line";"vient de para�tre N�2"
"Maestro";"Mus�e de la Bande dessin�e";"coll. � Biblioth�que du 9e Art �";"noir";"ISBN
: 2-907848-19-4";"95 F";"120
p.";"2000";"Bande dessin�e";"";"livre";"";"";"";"";"1035";"";"";"";"";"c�line";"vient
de para�tre N�2"
--data--
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Envoy� : mardi 10 septembre 2002 12:01
� : ActiveServerPages
Objet : RE: DB text driver
Hello
when i change the extension from .mer to .csv, i don't get any errors, except it is
not doing what it should :(
So what does it do? Code, error messages etc?
do i need special rights on the server to use the schema.ini?
just write access, which you obviously have
do you know of a good reference page?
First one on this link is good:
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=schema.ini
Cheers
Mark
-----Original Message-----
From: Tim Fletcher [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 10 september 2002 11:56
To: ActiveServerPages
Subject: RE: DB text driver
when i change the extension from .mer to .csv, i don't get any errors, except it is
not doing what it should :(
do i need special rights on the server to use the schema.ini? do you know of a good
reference page?
Thanks for your help
Cheers
Tim
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Envoy� : mardi 10 septembre 2002 11:40
� : ActiveServerPages
Objet : RE: DB text driver
Have you got a schema.ini file set up to describe this .mer file?
Mark
-----Original Message-----
From: Tim Fletcher [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 10 september 2002 11:33
To: ActiveServerPages
Subject: DB text driver
hi,
i'm trying to read data from a text file using the ODBC text driver. the Connection
string i'm using is
--cut--
Conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ=" & Server.MapPath("..") & "\data\publication\unzipped\;" & _
"Extensions=asc,csv,tab,txt,mer"
--cut--
and the SQLString is
--cut--
Rs.Open "SELECT * FROM adpfBiblio.mer", Conn, 1, 3
--cut--
the problem is i get the following message
--cut--
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.
/publication/import.asp, line 83
--cut--
line 83 being the "rs.open" statment
this code worked fine on my local server, so could it be that the text driver isn't
supported on the server? i have tried removing
the ",1,3" from the open statment, but i then get the following message
--cut--
[Microsoft][ODBC Text Driver] Cannot update. Database or object is read-only.
--cut--
why is it trying to "update" when i'm just executing a "SELECT" statment?
i hope this is clear enough :)
TIA
Cheers
Tim
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]