php3-list | 2000051
Date: 05/02/00
- Next message: Sam Liddicott: "[PHP3] Regex; what comes first?"
- Previous message: alain samoun: "RE: Re: [PHP3] PROS AND CONSHi,"
- In reply to: Mike Dennis: "[PHP3] PHP/ODBC/Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I 've never used Excel that way, with ODBC, but it seems that you may have a
look at the data type for your entries "1" and "2". It may be better to use:
insert into test (field1, field2) values (1,2)
Just a thought...
Also, Did you look at using COM (PHP4).
Alain
Message from Alain Samoun
alain <email protected>
HEAR ME>> http://pagoo.com/signature/alain
-----Original Message-----
From: Mike Dennis [mailto:mike <email protected>]
Sent: Tuesday, May 02, 2000 7:15 AM
To: php3 <email protected>
Subject: [PHP3] PHP/ODBC/Excel
Hello:
Can someone tell me what in an Excel worksheet must I use as the 'table'
name in a query? I configured an ODBC connection to an Excel spreadsheet
named 'TEST.XLS' for a system DSN named TEST I can successfully connect
to it via:
$result=odbc_connect('test','','');
But...when I try to do a simple insert like:
insert into test (field1, field2) values ("1","2")
within PHP code as:
$result2=odbc_exec($result,$insert_statement);
..I get:
Warning: SQL error: [Microsoft][ODBC Excel Driver] The Microsoft Jet
database engine could not find the object 'test'. Make sure the object
exists and that you spell its name and the path name correctly., SQL state
07001 in SQLExecDirect in webpages/test.php on line 47
I tried all possible combinations of file/sheet names but nothing works.
Has anyone here done something similar to what I'm doing? I normally use
mSQL but I have a requirement to support ODBC sources like Excel, dBase,
Access, and plain text files. Advice on these ODBC sources will be
greatly appreciated.
Thanks
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sam Liddicott: "[PHP3] Regex; what comes first?"
- Previous message: alain samoun: "RE: Re: [PHP3] PROS AND CONSHi,"
- In reply to: Mike Dennis: "[PHP3] PHP/ODBC/Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

