Re: MS access

2015-11-02 Thread Martin J. Evans

On 02/11/15 07:51, Ismail Chamseddine wrote:

I am using Active Perl 5.18.4 64 bit on Windows 7 64 bit
The connect string code
my $dbh = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb); 
database= C:\Users\User\Documents\Mydb.accdb');

On Fri, Oct 30, 2015 at 4:07 PM, Martin J. Evans > wrote:

On 30/10/2015 13:21, Ismail Chamseddine wrote:

I am trying to connect to MS access database on my PC. I am getting an 
error message of failure, data source not found, (ODBC driver manager) no 
default driver is mentioned . please help


Please try and help us help you and post more information. What Perl are 
you using, on what operating system? Show the extract of perl script calling 
DBI's connect method with the arguments. What data sources have you defined in 
the driver manager? Are they user or system DSNs? Are you using 32 or 64 bit 
platform (on Windows they use different ODBC administrators. What versions of 
DBI and presumably DBD::ODBC are you using?

Martin




Please don't reply just to me - keep it on the list.

Try DRIVER= instead of driver= and put {} around the driver name e.g.

'dbi:ODBC:DRVIER={microsoft access driver 
(*.mdb)};database=C:\Users\User\Documents\Mydb.accdb'

Martin


Re: MS access

2015-10-30 Thread mohammed.mustafa
Ismail,


Not much information to answer your query. However, please refer below link for 
debug,


http://www.easysoft.com/support/kb/kb01039.html

[http://www.easysoft.com/style/images/easysoft_logo.png]

Why do I get error "Data source name not found and no ...
The data source you are attempting to connect to does not exist on your 
machine. On Linux and UNIX, SYSTEM data sources are typically defined in 
/etc/odbc.ini. USER ...
Read more...






Regards,
Mustafa
+44-7440 56 12 32



From: Ismail Chamseddine 
Sent: Friday, October 30, 2015 6:51 PM
To: dbi-users@perl.org
Subject: MS access

I am trying to connect to MS access database on my PC. I am getting an error 
message of failure, data source not found, (ODBC driver manager) no default 
driver is mentioned . please help
Wipro Limited (Company Regn No in UK FC 019088) Address: Level 2, West wing, 3 
Sheldon Square, London W2 6PS, United Kingdom. Tel +44 20 7432 8500 Fax: +44 20 
7286 5703 VAT Number: 563 1964 27 (Branch of Wipro Limited (Incorporated in 
India at Bangalore with limited liability vide Reg no L9KA1945PLC02800 with 
Registrar of Companies at Bangalore, India. Authorized share capital Rs 5550 
mn)) Please do not print this email unless it is absolutely necessary. The 
information contained in this electronic message and any attachments to this 
message are intended for the exclusive use of the addressee(s) and may contain 
proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this email. www.wipro.com


Re: MS access

2015-10-30 Thread Martin J. Evans

On 30/10/2015 13:21, Ismail Chamseddine wrote:
I am trying to connect to MS access database on my PC. I am getting an 
error message of failure, data source not found, (ODBC driver manager) 
no default driver is mentioned . please help


Please try and help us help you and post more information. What Perl are 
you using, on what operating system? Show the extract of perl script 
calling DBI's connect method with the arguments. What data sources have 
you defined in the driver manager? Are they user or system DSNs? Are you 
using 32 or 64 bit platform (on Windows they use different ODBC 
administrators. What versions of DBI and presumably DBD::ODBC are you using?


Martin


Re: MS ACCESS text field truncated

2004-03-05 Thread Jason
Hi Tim,

The doc says LongTruncOK and LongReadLen have nothing to do with writing
data into DB. They are only for reading. In addition, I am dealing with
Text type data in MS ACCESS, not LONG type.

Thanks,
J.

Tim Johnson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

Look in the docs for the $dbh-LongTruncOk and $dbh-LongReadLen
properties.

-Original Message-
From: Jason Q. [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 12:50 PM
To: [EMAIL PROTECTED]
Subject: MS ACCESS text field truncated

Hi there,

I am using DBI to access Microsoft ACCESS database. I found the data of
text field logged by DBI has been truncated to 50 characters. I have
changed the field size from 50 to 255, but it still doesn't work. Anyone
can help?

Thanks,
J.




RE: MS ACCESS text field truncated

2004-03-05 Thread Tim Johnson

 D'oh!  You're right.  I guess I should get more sleep before answering
questions...

-Original Message-
From: Jason [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 2:16 PM
To: [EMAIL PROTECTED]
Subject: Re: MS ACCESS text field truncated

Hi Tim,

The doc says LongTruncOK and LongReadLen have nothing to do with writing
data into DB. They are only for reading. In addition, I am dealing with
Text type data in MS ACCESS, not LONG type.

Thanks,
J.

Tim Johnson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

Look in the docs for the $dbh-LongTruncOk and $dbh-LongReadLen
properties.



RE: MS ACCESS text field truncated

2004-03-05 Thread Jeff Urlwin
 
 Hi Tim,
 
 The doc says LongTruncOK and LongReadLen have nothing to do 
 with writing data into DB. They are only for reading. In 
 addition, I am dealing with Text type data in MS ACCESS, 
 not LONG type.

Just to butt in here...you should have specified that better in your
original posting.  

Please send your insert/update statement and snippet of code as to how you
are logging the data, so that we can help better.  Most likely, it's a
problem with the binding.  I may ask you to send a trace.

Regards,

Jeff


 
 Thanks,
 J.
 
 Tim Johnson [EMAIL PROTECTED] wrote in message 
 news:78E0B682C9508740B37610A9342E9DCD034A90FE@ hqex1.sandisk.local...
 
 Look in the docs for the $dbh-LongTruncOk and 
 $dbh-LongReadLen properties.
 
 -Original Message-
 From: Jason Q. [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 04, 2004 12:50 PM
 To: [EMAIL PROTECTED]
 Subject: MS ACCESS text field truncated
 
 Hi there,
 
 I am using DBI to access Microsoft ACCESS database. I found 
 the data of text field logged by DBI has been truncated to 
 50 characters. I have changed the field size from 50 to 255, 
 but it still doesn't work. Anyone can help?
 
 Thanks,
 J.
 
 



Re: MS ACCESS text field truncated

2004-03-05 Thread Jason
Hello Jeff,

At first, I did put type longvarchar, then I read the doc and copy the type
LONGVARCHAR to my code. All the other parts very simple because I use the
default way to make connection and create prepared statement. The field
$address is mapped to Text field of size 255 in MS ACCESS DB, but got
truncated to 50, which is the default field size in MS ACCESS

 $iSth-bind_param(1, $name);
 $iSth-bind_param(2, $address, DBI::SQL_LONGVARCHAR);

Let me know if there is anything else you want. Thank you for your help.

J.



Jeff Urlwin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 
  Hi Tim,
 
  The doc says LongTruncOK and LongReadLen have nothing to do
  with writing data into DB. They are only for reading. In
  addition, I am dealing with Text type data in MS ACCESS,
  not LONG type.

 Just to butt in here...you should have specified that better in your
 original posting.

 Please send your insert/update statement and snippet of code as to how you
 are logging the data, so that we can help better.  Most likely, it's a
 problem with the binding.  I may ask you to send a trace.

 Regards,

 Jeff


 
  Thanks,
  J.
 
  Tim Johnson [EMAIL PROTECTED] wrote in message
  news:78E0B682C9508740B37610A9342E9DCD034A90FE@ hqex1.sandisk.local...
 
  Look in the docs for the $dbh-LongTruncOk and
  $dbh-LongReadLen properties.
 
  -Original Message-
  From: Jason Q. [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 04, 2004 12:50 PM
  To: [EMAIL PROTECTED]
  Subject: MS ACCESS text field truncated
 
  Hi there,
 
  I am using DBI to access Microsoft ACCESS database. I found
  the data of text field logged by DBI has been truncated to
  50 characters. I have changed the field size from 50 to 255,
  but it still doesn't work. Anyone can help?
 
  Thanks,
  J.
 
 





RE: MS ACCESS text field truncated

2004-03-04 Thread Tim Johnson

Look in the docs for the $dbh-LongTruncOk and $dbh-LongReadLen
properties.

-Original Message-
From: Jason Q. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 12:50 PM
To: [EMAIL PROTECTED]
Subject: MS ACCESS text field truncated

Hi there,

I am using DBI to access Microsoft ACCESS database. I found the data of
text field logged by DBI has been truncated to 50 characters. I have
changed the field size from 50 to 255, but it still doesn't work. Anyone
can help?

Thanks,
J.


RE: MS Access 2002, DBI ODBC and Unicode

2003-03-30 Thread Jeff Urlwin
 
 
 Hi there,
 
 Is there a way to use Unicode SQL statement for MS Access 
 2002 through the DBI ODBC driver? I know Access stores text 
 in Unicode internally and the ActiveState Perl 5.8 supports 
 unicode pretty well. But I cannot make this combination work 
 (I need to insert Chinese, Japanese, Korean text into the database).
 
 If this combination does not work, could I use other 
 interface (i.e. not DBI) to insert unicode text? Could anyone 
 give me some advise?
 
 Any help would be greatly appreciated.

I wish I had better news for you.  It's on my todo list.  My todo list would
be greatly accelerated by patches, of course, but short of that, any sample
programs which are self-contained and show what you want to do and show how
it fails would be much more likely addressed quickly.  I.e. a sample which
has the following, general framework:

Drop table; (wrap this in eval {} )
Create table (with your columns required)
Insert into table
Select from table
Compare inserted data to selected data and see if it fails.

I have some samples of test scripts that follow this pattern, if it helps.

Jeff




Re: MS Access

2002-06-27 Thread Steffen Goeldner

Tim Harsch wrote:
 
 Forgive my naivity (or just flawed understanding) but how would one go
 about creating a DBD::Access?  For instance DBD::Oracle is built on OCI,
 does Access have a similar network protocol?  I thought that ODBC was
 about the only MS supported method of communicating to it...

Matt Pietrek wrote a good survey of various MS DB API's:

  http://www.microsoft.com/msj/0699/hood/hood0699.htm

See also 'Universal Data Access: A Road Map for the Future':

  http://www.microsoft.com/data/udastra.htm#roadmap


Steffen




Re: MS Access

2002-06-25 Thread Jeff Zucker

Orlando Andico wrote:

 It IS possible to read MSAccess files on a Linux box.
 http://mdbtools.sourceforge.net/


Hmm, I had no idea that was available, forget my advice about saving the 
Access files as CSV.

At first glance it looks like it would be trivial to build an 
AnyData::Format::Access.pm using mdbtools which would then provide 
direct DBI interface to the MDB files.  If anyone is interested in doing 
this, let me know and I'll help.

-- 
Jeff




Re: MS Access

2002-06-25 Thread Keith Clay

With the freetds drivers you can connect directly from solaris to an 
MS-Access database.  I have done it many times and if you search on 
google there is a webpage that tells how to do it.

keith

Jeff Zucker wrote:
 Orlando Andico wrote:
 
 It IS possible to read MSAccess files on a Linux box.
 http://mdbtools.sourceforge.net/
 
 
 
 Hmm, I had no idea that was available, forget my advice about saving the 
 Access files as CSV.
 
 At first glance it looks like it would be trivial to build an 
 AnyData::Format::Access.pm using mdbtools which would then provide 
 direct DBI interface to the MDB files.  If anyone is interested in doing 
 this, let me know and I'll help.
 


-- 
-
Keith Clay, [EMAIL PROTECTED]
Lead Programmer, Web Integration and Programming
286 Adams Center for Teaching Excellence
Abilene Christian University
Abilene, TX 79699
(915) 674-2187
(915) 674-2834
-




Re: MS Access

2002-06-25 Thread Brian Bruns


Actually since MDB Tools is also an ODBC driver, you could probably use 
DBD::ODBC as well.  Although to be honest, the SQL engine and ODBC driver 
have a number of nasty bugs.

I haven't tried this arrangement myself, so buyer beware.

Brian

On 25 Jun 2002, Jeff Zucker wrote:

 Orlando Andico wrote:
 
  It IS possible to read MSAccess files on a Linux box.
  http://mdbtools.sourceforge.net/
 
 
 Hmm, I had no idea that was available, forget my advice about saving the 
 Access files as CSV.
 
 At first glance it looks like it would be trivial to build an 
 AnyData::Format::Access.pm using mdbtools which would then provide 
 direct DBI interface to the MDB files.  If anyone is interested in doing 
 this, let me know and I'll help.
 
 




Re: MS Access

2002-06-24 Thread John D Groenveld

DBD::ODBC.
John
[EMAIL PROTECTED]




Re: MS Access

2002-06-24 Thread Bart Lateur

On Mon, 24 Jun 2002 16:22:38 -0700, Erick Nelson wrote:

I've just spent the last 15 minutes looking at CPAN for a module  to
query a MS Access database.
Which modules do I need to download?

You need DBD::ODBC.

Can someone throw me a hint? :)

Well: first create a DSN for the database using the ODBC control panel
(comes with Windows). You can simply use the name that you used for it
there, to connect to the db in the connect string. Just look at these
FAQ entries:

I need to define a DSN for ODBC, how do I do it and which type should I
use?
http://xmlproj.dyndns.org/faqomatic/cache/6.html

Example of DBD::ODBC and Access with Northwind database
http://xmlproj.dyndns.org/faqomatic/cache/17.html


The archives for this list surely contain some more detailed recipes for
creating the DSN.

-- 
Bart.



RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread MacGown, Peter

Jeff,
You are correct that it does work from the command line.  The share name
fssdata share is accessible to me, but just to verify that something funky
isn't going on, I copied the mdb file over to the web server and tried to
run it from there.  I still got the same message.
As a newbie to perl and apache, I took on a task of trying to set up a web
application to cut my teeth.  The existing application has proven all too
successful and the user population has outgrown MS Access.  An Oracle server
is in the works, but until then, I need to get it up and running using MS
Access.
I Know that this question is perl-101, but, given my inexperience with perl,
what do you mean by ...set a trace file and set the DBI tracing level to
4...?
Thanks,
Pete MacGown   

-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 9:22 PM
To: MacGown, Peter; [EMAIL PROTECTED]
Subject: RE: MS Access/CGI/Apache on WinNT questions


That, unfortunately, can be a bad message because of the way that DBD::ODBC
handles opening the database.  What's happening is that DBI can't open the
database using the DSN-less style open (SQLDriverConnect) which fails and
then tries to call SQLConnect, which expects a 32? character or less DSN.  I
hope to make this better in the future...

In the mean time, I'm going to guess that this may work from the command
line and not from the CGI.  If that's not the case, this may or may not
apply.
Check the share name fssdata and ensure it's accessible from the
username
starting the web service (make sure the web server is not being started as
local system, either, as that will have NO access to the network).

IF that doesn't work, set a trace file and set the DBI tracing level to 4
(or above) and post it back here.

Jeff


 Hi,
 I hope other people have been successful at getting CGI scripts
 running that
 access MS Access because I haven't.  Here is a snippet of code that I am
 trying to get to work:

 #!d:/perl/bin/perl -wT

 use DBI;

 my $dsn = driver=Microsoft Access Driver
 (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
 my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
   print BRError Opening Database: $DBI::errstr\n;

 But I get this message:

 Error Opening Database: [Microsoft][ODBC Driver Manager] Invalid string or
 buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1)

 Am I doing something amazingly stupid and just can't see it?  Is there a
 better way to get to an MS Access database?

 Please help!

 Thanks,
 Pete MacGown







RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread Jeff Urlwin

Pete,

Right before the connect, do the following:

DBI-trace(5, c:/trace.txt);

Then, send me the trace.txt from the web server's C: drive.  (and, look at
it yourself to see if the error is recognizable).

Some other questions...
What version of DBD::ODBC are you using?
Are you using MS-Access security?
Does the web server user have access to the admin database?

Regards,

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 10:05 AM
 To: [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Jeff,
 You are correct that it does work from the command line.  The share name
 fssdata share is accessible to me, but just to verify that
 something funky
 isn't going on, I copied the mdb file over to the web server and tried to
 run it from there.  I still got the same message.
 As a newbie to perl and apache, I took on a task of trying to set up a web
 application to cut my teeth.  The existing application has proven all too
 successful and the user population has outgrown MS Access.  An
 Oracle server
 is in the works, but until then, I need to get it up and running using MS
 Access.
 I Know that this question is perl-101, but, given my inexperience
 with perl,
 what do you mean by ...set a trace file and set the DBI tracing level to
 4...?
 Thanks,
 Pete MacGown

 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 11, 2002 9:22 PM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 That, unfortunately, can be a bad message because of the way that
 DBD::ODBC
 handles opening the database.  What's happening is that DBI can't open the
 database using the DSN-less style open (SQLDriverConnect) which
 fails and
 then tries to call SQLConnect, which expects a 32? character or
 less DSN.  I
 hope to make this better in the future...

 In the mean time, I'm going to guess that this may work from the command
 line and not from the CGI.  If that's not the case, this may or may not
 apply.
   Check the share name fssdata and ensure it's accessible from the
 username
 starting the web service (make sure the web server is not being started as
 local system, either, as that will have NO access to the network).

 IF that doesn't work, set a trace file and set the DBI tracing level to 4
 (or above) and post it back here.

 Jeff

 
  Hi,
  I hope other people have been successful at getting CGI scripts
  running that
  access MS Access because I haven't.  Here is a snippet of code that I am
  trying to get to work:
 
  #!d:/perl/bin/perl -wT
 
  use DBI;
 
  my $dsn = driver=Microsoft Access Driver
  (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
  my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
  print BRError Opening Database: $DBI::errstr\n;
 
  But I get this message:
 
  Error Opening Database: [Microsoft][ODBC Driver Manager]
 Invalid string or
  buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1)
 
  Am I doing something amazingly stupid and just can't see it?  Is there a
  better way to get to an MS Access database?
 
  Please help!
 
  Thanks,
  Pete MacGown
 
 







RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread MacGown, Peter

Hi Jeff:

This is a snippet of the code:

use DBI;

my $dsn = driver=Microsoft Access Driver
(*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;

DBI-trace(5, c:/trace.txt);

my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
print BRError Opening Database: $DBI::errstr\n;

my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
T_EMPLOYEES) ||
print Error in Prepare:  $DBI::errstr\n;

$sth-execute() ||
print BRError:  $DBI::errstr\n;

}
This is what I get:

DBI 1.201-nothread dispatch trace level set to 5
- DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
(*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
- DBI-install_driver(ODBC) for MSWin32 perl=5.006001 pid=135 ruid=0
euid=0
   install_driver: DBD::ODBC version 0.28 loaded from
d:/Perl/site/lib/DBD/ODBC.pm
New DBI::dr (for DBD::ODBC::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
DBD::ODBC::dr, 0, Null!)
dbih_make_com(Null!, DBD::ODBC::dr, 92)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!) SCALAR(0x1b79f18)
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
SCALAR(0x1b79f60) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
SCALAR(0x1b79f3c) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
ARRAY(0x191aa10) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!) 0 (already
defined)
dbih_setup_attrib(DBI::dr=HASH(0x191aa94), FetchHashKeyName, Null!)
'NAME' (already defined)
- install_driver= DBI::dr=HASH(0x1a31908)
- connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
'driver=Microsoft Access Driver (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
'admin'  HASH(0x191ef94))

Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.

Any suggestions?

Thanks,
Pete 

-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 11:35 AM
To: MacGown, Peter; [EMAIL PROTECTED]
Subject: RE: MS Access/CGI/Apache on WinNT questions


Pete,

Right before the connect, do the following:

DBI-trace(5, c:/trace.txt);

Then, send me the trace.txt from the web server's C: drive.  (and, look at
it yourself to see if the error is recognizable).

Some other questions...
What version of DBD::ODBC are you using?
Are you using MS-Access security?
Does the web server user have access to the admin database?

Regards,

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 10:05 AM
 To: [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Jeff,
 You are correct that it does work from the command line.  The share name
 fssdata share is accessible to me, but just to verify that
 something funky
 isn't going on, I copied the mdb file over to the web server and tried to
 run it from there.  I still got the same message.
 As a newbie to perl and apache, I took on a task of trying to set up a web
 application to cut my teeth.  The existing application has proven all too
 successful and the user population has outgrown MS Access.  An
 Oracle server
 is in the works, but until then, I need to get it up and running using MS
 Access.
 I Know that this question is perl-101, but, given my inexperience
 with perl,
 what do you mean by ...set a trace file and set the DBI tracing level to
 4...?
 Thanks,
 Pete MacGown

 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 11, 2002 9:22 PM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 That, unfortunately, can be a bad message because of the way that
 DBD::ODBC
 handles opening the database.  What's happening is that DBI can't open the
 database using the DSN-less style open (SQLDriverConnect) which
 fails and
 then tries to call SQLConnect, which expects a 32? character or
 less DSN.  I
 hope to make this better in the future...

 In the mean time, I'm going to guess that this may work from the command
 line and not from the CGI.  If that's not the case, this may or may not
 apply.
   Check the share name fssdata and ensure it's accessible from the
 username
 starting the web service (make sure the web server is not being started as
 local system, either, as that will have NO access to the network).

 IF that doesn't work, set a trace file and set the DBI tracing level to 4
 (or above) and post it back here.

 Jeff

 
  Hi,
  I hope other people have been successful at getting CGI scripts
  running that
  access MS Access because I haven't.  Here is a snippet of code that I am
  trying to get to work:
 
  #!d:/perl/bin/perl -wT
 
  use DBI;
 
  my $dsn = driver=Microsoft Access Driver
  (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
  my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy

RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread MacGown, Peter

Jeff,
In answer to your other questions:

What version of DBD::ODBC are you using?

PPMquery DBI
DBI [1.201] Database independent interface for Perl

Are you using MS-Access security?

I am not using mdw files, if that is what you mean, but I do have
the mdb file passworded.

Does the web server user have access to the admin database?

I believe so, unless Apache web server has a different user than my
NT network login.  I use a discarded low end NT machine for development.  I
am logged into the machine as myself when I (re)start Apache.

Pete




RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread Jeff Urlwin


What version of DBD::ODBC are you using?
What version of the Access driver are you using?
When you copied to the local web server, what was the DSN you used?

Thanks,

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Hi Jeff:

 This is a snippet of the code:

   use DBI;

   my $dsn = driver=Microsoft Access Driver
 (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;

   DBI-trace(5, c:/trace.txt);

   my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
   print BRError Opening Database: $DBI::errstr\n;

   my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
 T_EMPLOYEES) ||
   print Error in Prepare:  $DBI::errstr\n;

   $sth-execute() ||
   print BRError:  $DBI::errstr\n;

 }
 This is what I get:

 DBI 1.201-nothread dispatch trace level set to 5
 - DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
 (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
 - DBI-install_driver(ODBC) for MSWin32 perl=5.006001 pid=135 ruid=0
 euid=0
install_driver: DBD::ODBC version 0.28 loaded from
 d:/Perl/site/lib/DBD/ODBC.pm
 New DBI::dr (for DBD::ODBC::dr, parent=, id=)
 dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
 DBD::ODBC::dr, 0, Null!)
 dbih_make_com(Null!, DBD::ODBC::dr, 92)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!)
 SCALAR(0x1b79f18)
 (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
 SCALAR(0x1b79f60) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
 SCALAR(0x1b79f3c) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
 ARRAY(0x191aa10) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!) 0 (already
 defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), FetchHashKeyName, Null!)
 'NAME' (already defined)
 - install_driver= DBI::dr=HASH(0x1a31908)
 - connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
 'driver=Microsoft Access Driver
 (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
 'admin'  HASH(0x191ef94))

 Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.

 Any suggestions?

 Thanks,
 Pete

 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 11:35 AM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Pete,

 Right before the connect, do the following:

   DBI-trace(5, c:/trace.txt);

 Then, send me the trace.txt from the web server's C: drive.  (and, look at
 it yourself to see if the error is recognizable).

 Some other questions...
 What version of DBD::ODBC are you using?
 Are you using MS-Access security?
 Does the web server user have access to the admin database?

 Regards,

 Jeff

  -Original Message-
  From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 10:05 AM
  To: [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Jeff,
  You are correct that it does work from the command line.  The share name
  fssdata share is accessible to me, but just to verify that
  something funky
  isn't going on, I copied the mdb file over to the web server
 and tried to
  run it from there.  I still got the same message.
  As a newbie to perl and apache, I took on a task of trying to
 set up a web
  application to cut my teeth.  The existing application has
 proven all too
  successful and the user population has outgrown MS Access.  An
  Oracle server
  is in the works, but until then, I need to get it up and
 running using MS
  Access.
  I Know that this question is perl-101, but, given my inexperience
  with perl,
  what do you mean by ...set a trace file and set the DBI
 tracing level to
  4...?
  Thanks,
  Pete MacGown
 
  -Original Message-
  From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
  Sent: Monday, March 11, 2002 9:22 PM
  To: MacGown, Peter; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  That, unfortunately, can be a bad message because of the way that
  DBD::ODBC
  handles opening the database.  What's happening is that DBI
 can't open the
  database using the DSN-less style open (SQLDriverConnect) which
  fails and
  then tries to call SQLConnect, which expects a 32? character or
  less DSN.  I
  hope to make this better in the future...
 
  In the mean time, I'm going to guess that this may work from the command
  line and not from the CGI.  If that's not the case, this may or may not
  apply.
  Check the share name fssdata and ensure it's accessible from the
  username
  starting the web service (make sure the web server is not being
 started as
  local system, either, as that will have NO access to the network).
 
  IF that doesn't work, set a trace file

RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread MacGown, Peter



-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 1:32 PM
To: MacGown, Peter; [EMAIL PROTECTED]
Subject: RE: MS Access/CGI/Apache on WinNT questions



What version of DBD::ODBC are you using?

PPM query ODBC
DBD-ODBC [0.28] ODBC driver for the DBI module.

When I do a verify, all the packages are up to date.

What version of the Access driver are you using?

4.00.4202.00
The database is from MS Office, MS Access 97

When you copied to the local web server, what was the DSN you used?

I tried two ways:

d:\inetpub\wwwroot\Roster\roster03b.mdb

and

\\wilntws111\inetpub\wwwroot\Roster\roster03b.mdb

where \\wilntws111 is the PC on the network, and \inetpub is a share
on that machine.

Thanks,

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Hi Jeff:

 This is a snippet of the code:

   use DBI;

   my $dsn = driver=Microsoft Access Driver
 (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;

   DBI-trace(5, c:/trace.txt);

   my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
   print BRError Opening Database: $DBI::errstr\n;

   my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
 T_EMPLOYEES) ||
   print Error in Prepare:  $DBI::errstr\n;

   $sth-execute() ||
   print BRError:  $DBI::errstr\n;

 }
 This is what I get:

 DBI 1.201-nothread dispatch trace level set to 5
 - DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
 (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
 - DBI-install_driver(ODBC) for MSWin32 perl=5.006001 pid=135 ruid=0
 euid=0
install_driver: DBD::ODBC version 0.28 loaded from
 d:/Perl/site/lib/DBD/ODBC.pm
 New DBI::dr (for DBD::ODBC::dr, parent=, id=)
 dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
 DBD::ODBC::dr, 0, Null!)
 dbih_make_com(Null!, DBD::ODBC::dr, 92)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!)
 SCALAR(0x1b79f18)
 (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
 SCALAR(0x1b79f60) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
 SCALAR(0x1b79f3c) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
 ARRAY(0x191aa10) (already defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!) 0 (already
 defined)
 dbih_setup_attrib(DBI::dr=HASH(0x191aa94), FetchHashKeyName, Null!)
 'NAME' (already defined)
 - install_driver= DBI::dr=HASH(0x1a31908)
 - connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
 'driver=Microsoft Access Driver
 (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
 'admin'  HASH(0x191ef94))

 Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.

 Any suggestions?

 Thanks,
 Pete

 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 11:35 AM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Pete,

 Right before the connect, do the following:

   DBI-trace(5, c:/trace.txt);

 Then, send me the trace.txt from the web server's C: drive.  (and, look at
 it yourself to see if the error is recognizable).

 Some other questions...
 What version of DBD::ODBC are you using?
 Are you using MS-Access security?
 Does the web server user have access to the admin database?

 Regards,

 Jeff

  -Original Message-
  From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 10:05 AM
  To: [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Jeff,
  You are correct that it does work from the command line.  The share name
  fssdata share is accessible to me, but just to verify that
  something funky
  isn't going on, I copied the mdb file over to the web server
 and tried to
  run it from there.  I still got the same message.
  As a newbie to perl and apache, I took on a task of trying to
 set up a web
  application to cut my teeth.  The existing application has
 proven all too
  successful and the user population has outgrown MS Access.  An
  Oracle server
  is in the works, but until then, I need to get it up and
 running using MS
  Access.
  I Know that this question is perl-101, but, given my inexperience
  with perl,
  what do you mean by ...set a trace file and set the DBI
 tracing level to
  4...?
  Thanks,
  Pete MacGown
 
  -Original Message-
  From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
  Sent: Monday, March 11, 2002 9:22 PM
  To: MacGown, Peter; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  That, unfortunately, can be a bad message because of the way that
  DBD::ODBC
  handles opening the database

RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread Jeff Urlwin

Peter,

Did you escape the back-slashes?  I.e. \\ instead of \?

I will, tonight, upload a new DBI and DBD::ODBC for you which I'd like to
see the output of trace.  These will be PPD files, for use with PPM and
that will get you up to the latest versions.

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 1:59 PM
 To: 'Jeff Urlwin'; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions




 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 1:32 PM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions



 What version of DBD::ODBC are you using?

   PPM query ODBC
   DBD-ODBC [0.28] ODBC driver for the DBI module.

   When I do a verify, all the packages are up to date.

 What version of the Access driver are you using?

   4.00.4202.00
   The database is from MS Office, MS Access 97

 When you copied to the local web server, what was the DSN you used?

   I tried two ways:

   d:\inetpub\wwwroot\Roster\roster03b.mdb

   and

   \\wilntws111\inetpub\wwwroot\Roster\roster03b.mdb

   where \\wilntws111 is the PC on the network, and \inetpub is a share
 on that machine.

 Thanks,

 Jeff

  -Original Message-
  From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 12:21 PM
  To: [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Hi Jeff:
 
  This is a snippet of the code:
 
  use DBI;
 
  my $dsn = driver=Microsoft Access Driver
  (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
 
  DBI-trace(5, c:/trace.txt);
 
  my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
  print BRError Opening Database: $DBI::errstr\n;
 
  my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
  T_EMPLOYEES) ||
  print Error in Prepare:  $DBI::errstr\n;
 
  $sth-execute() ||
  print BRError:  $DBI::errstr\n;
 
  }
  This is what I get:
 
  DBI 1.201-nothread dispatch trace level set to 5
  - DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
  (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
  - DBI-install_driver(ODBC) for MSWin32 perl=5.006001
 pid=135 ruid=0
  euid=0
 install_driver: DBD::ODBC version 0.28 loaded from
  d:/Perl/site/lib/DBD/ODBC.pm
  New DBI::dr (for DBD::ODBC::dr, parent=, id=)
  dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
  DBD::ODBC::dr, 0, Null!)
  dbih_make_com(Null!, DBD::ODBC::dr, 92)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!)
  SCALAR(0x1b79f18)
  (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
  SCALAR(0x1b79f60) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
  SCALAR(0x1b79f3c) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
  ARRAY(0x191aa10) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!) 0 (already
  defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), FetchHashKeyName, Null!)
  'NAME' (already defined)
  - install_driver= DBI::dr=HASH(0x1a31908)
  - connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
  'driver=Microsoft Access Driver
  (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
  'admin'  HASH(0x191ef94))
 
  Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.
 
  Any suggestions?
 
  Thanks,
  Pete
 
  -Original Message-
  From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 11:35 AM
  To: MacGown, Peter; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Pete,
 
  Right before the connect, do the following:
 
  DBI-trace(5, c:/trace.txt);
 
  Then, send me the trace.txt from the web server's C: drive.
 (and, look at
  it yourself to see if the error is recognizable).
 
  Some other questions...
  What version of DBD::ODBC are you using?
  Are you using MS-Access security?
  Does the web server user have access to the admin database?
 
  Regards,
 
  Jeff
 
   -Original Message-
   From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, March 12, 2002 10:05 AM
   To: [EMAIL PROTECTED]
   Subject: RE: MS Access/CGI/Apache on WinNT questions
  
  
   Jeff,
   You are correct that it does work from the command line.  The
 share name
   fssdata share is accessible to me, but just to verify that
   something funky
   isn't going on, I copied the mdb file over to the web server
  and tried to
   run it from there.  I still got the same message.
   As a newbie to perl and apache, I took on a task of trying to
  set up a web
   application to cut my teeth.  The existing application has
  proven all too
   successful and the user population has outgrown MS Access.  An
   Oracle server
   is in the works, but until then, I need to get

RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread MacGown, Peter

Jeff,

I use notepad to modify the CGI scripts.  I type in \\ so perl will
interpret this as a single \.  This works for the command line perl.  I
just can't get it to work on the web version.  I won't be into work
tomorrow, so won't be able to get the latest versions of DBI until Thursday.

I was looking at Win32-ODBC, but I'd rather use DBI and DBD::ODBC because I
will end up using it anyway.

Thanks,
Pete

-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 4:12 PM
To: MacGown, Peter; 'Jeff Urlwin'; [EMAIL PROTECTED]
Subject: RE: MS Access/CGI/Apache on WinNT questions


Peter,

Did you escape the back-slashes?  I.e. \\ instead of \?

I will, tonight, upload a new DBI and DBD::ODBC for you which I'd like to
see the output of trace.  These will be PPD files, for use with PPM and
that will get you up to the latest versions.

Jeff

 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 1:59 PM
 To: 'Jeff Urlwin'; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions




 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 1:32 PM
 To: MacGown, Peter; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions



 What version of DBD::ODBC are you using?

   PPM query ODBC
   DBD-ODBC [0.28] ODBC driver for the DBI module.

   When I do a verify, all the packages are up to date.

 What version of the Access driver are you using?

   4.00.4202.00
   The database is from MS Office, MS Access 97

 When you copied to the local web server, what was the DSN you used?

   I tried two ways:

   d:\inetpub\wwwroot\Roster\roster03b.mdb

   and

   \\wilntws111\inetpub\wwwroot\Roster\roster03b.mdb

   where \\wilntws111 is the PC on the network, and \inetpub is a share
 on that machine.

 Thanks,

 Jeff

  -Original Message-
  From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 12:21 PM
  To: [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Hi Jeff:
 
  This is a snippet of the code:
 
  use DBI;
 
  my $dsn = driver=Microsoft Access Driver
  (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
 
  DBI-trace(5, c:/trace.txt);
 
  my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
  print BRError Opening Database: $DBI::errstr\n;
 
  my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
  T_EMPLOYEES) ||
  print Error in Prepare:  $DBI::errstr\n;
 
  $sth-execute() ||
  print BRError:  $DBI::errstr\n;
 
  }
  This is what I get:
 
  DBI 1.201-nothread dispatch trace level set to 5
  - DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
  (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
  - DBI-install_driver(ODBC) for MSWin32 perl=5.006001
 pid=135 ruid=0
  euid=0
 install_driver: DBD::ODBC version 0.28 loaded from
  d:/Perl/site/lib/DBD/ODBC.pm
  New DBI::dr (for DBD::ODBC::dr, parent=, id=)
  dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
  DBD::ODBC::dr, 0, Null!)
  dbih_make_com(Null!, DBD::ODBC::dr, 92)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!)
  SCALAR(0x1b79f18)
  (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
  SCALAR(0x1b79f60) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
  SCALAR(0x1b79f3c) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
  ARRAY(0x191aa10) (already defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!) 0 (already
  defined)
  dbih_setup_attrib(DBI::dr=HASH(0x191aa94), FetchHashKeyName, Null!)
  'NAME' (already defined)
  - install_driver= DBI::dr=HASH(0x1a31908)
  - connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
  'driver=Microsoft Access Driver
  (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
  'admin'  HASH(0x191ef94))
 
  Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.
 
  Any suggestions?
 
  Thanks,
  Pete
 
  -Original Message-
  From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 11:35 AM
  To: MacGown, Peter; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
  Pete,
 
  Right before the connect, do the following:
 
  DBI-trace(5, c:/trace.txt);
 
  Then, send me the trace.txt from the web server's C: drive.
 (and, look at
  it yourself to see if the error is recognizable).
 
  Some other questions...
  What version of DBD::ODBC are you using?
  Are you using MS-Access security?
  Does the web server user have access to the admin database?
 
  Regards,
 
  Jeff
 
   -Original Message-
   From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, March 12, 2002 10:05 AM
   To: [EMAIL PROTECTED]
   Subject: RE: MS

RE: MS Access/CGI/Apache on WinNT questions

2002-03-12 Thread Jeff Urlwin

Sounds good so far.  Let's try these:

from ppm, you should be able to:

install ftp://ftp.esoftmatic.com/outgoing/DBI/DBI.ppd
install ftp://ftp.esoftmatic.com/outgoing/DBI/DBD-ODBC.ppd

If not, ftp to ftp::/ftp.esoftmatic.com/outgoing/DBI/
and download all the files into, say, c:\tmp and then install
c:\tmp\DBI.ppd, etc

Let me know if you have issues.

Thanks,

Jeff


 -Original Message-
 From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 5:11 PM
 To: 'Jeff Urlwin'; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Jeff,

 I use notepad to modify the CGI scripts.  I type in \\ so perl will
 interpret this as a single \.  This works for the command line perl.  I
 just can't get it to work on the web version.  I won't be into work
 tomorrow, so won't be able to get the latest versions of DBI
 until Thursday.

 I was looking at Win32-ODBC, but I'd rather use DBI and DBD::ODBC
 because I
 will end up using it anyway.

 Thanks,
 Pete

 -Original Message-
 From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 12, 2002 4:12 PM
 To: MacGown, Peter; 'Jeff Urlwin'; [EMAIL PROTECTED]
 Subject: RE: MS Access/CGI/Apache on WinNT questions


 Peter,

 Did you escape the back-slashes?  I.e. \\ instead of \?

 I will, tonight, upload a new DBI and DBD::ODBC for you which I'd like to
 see the output of trace.  These will be PPD files, for use with PPM and
 that will get you up to the latest versions.

 Jeff

  -Original Message-
  From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 1:59 PM
  To: 'Jeff Urlwin'; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
 
 
  -Original Message-
  From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, March 12, 2002 1:32 PM
  To: MacGown, Peter; [EMAIL PROTECTED]
  Subject: RE: MS Access/CGI/Apache on WinNT questions
 
 
 
  What version of DBD::ODBC are you using?
 
  PPM query ODBC
  DBD-ODBC [0.28] ODBC driver for the DBI module.
 
  When I do a verify, all the packages are up to date.
 
  What version of the Access driver are you using?
 
  4.00.4202.00
  The database is from MS Office, MS Access 97
 
  When you copied to the local web server, what was the DSN you used?
 
  I tried two ways:
 
  d:\inetpub\wwwroot\Roster\roster03b.mdb
 
  and
 
  \\wilntws111\inetpub\wwwroot\Roster\roster03b.mdb
 
  where \\wilntws111 is the PC on the network, and \inetpub is a share
  on that machine.
 
  Thanks,
 
  Jeff
 
   -Original Message-
   From: MacGown, Peter [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, March 12, 2002 12:21 PM
   To: [EMAIL PROTECTED]
   Subject: RE: MS Access/CGI/Apache on WinNT questions
  
  
   Hi Jeff:
  
   This is a snippet of the code:
  
 use DBI;
  
 my $dsn = driver=Microsoft Access Driver
   (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
  
 DBI-trace(5, c:/trace.txt);
  
 my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
 print BRError Opening Database: $DBI::errstr\n;
  
 my $sth = $dbh-prepare(SELECT [LNAME], [FNAME], [MI] FROM
   T_EMPLOYEES) ||
 print Error in Prepare:  $DBI::errstr\n;
  
 $sth-execute() ||
 print BRError:  $DBI::errstr\n;
  
   }
   This is what I get:
  
   DBI 1.201-nothread dispatch trace level set to 5
   - DBI-connect(DBI:ODBC:driver=Microsoft Access Driver
   (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb, admin, )
   - DBI-install_driver(ODBC) for MSWin32 perl=5.006001
  pid=135 ruid=0
   euid=0
  install_driver: DBD::ODBC version 0.28 loaded from
   d:/Perl/site/lib/DBD/ODBC.pm
   New DBI::dr (for DBD::ODBC::dr, parent=, id=)
  
 dbih_setup_handle(DBI::dr=HASH(0x1a31908)=DBI::dr=HASH(0x191aa94),
   DBD::ODBC::dr, 0, Null!)
   dbih_make_com(Null!, DBD::ODBC::dr, 92)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Err, Null!)
   SCALAR(0x1b79f18)
   (already defined)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94), State, Null!)
   SCALAR(0x1b79f60) (already defined)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Errstr, Null!)
   SCALAR(0x1b79f3c) (already defined)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Handlers, Null!)
   ARRAY(0x191aa10) (already defined)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94), Debug, Null!)
 0 (already
   defined)
   dbih_setup_attrib(DBI::dr=HASH(0x191aa94),
 FetchHashKeyName, Null!)
   'NAME' (already defined)
   - install_driver= DBI::dr=HASH(0x1a31908)
   - connect for DBD::ODBC::dr (DBI::dr=HASH(0x1a31908)~0x191aa94
   'driver=Microsoft Access Driver
   (*.mdb);dbq=\\nrent01\fssdata\Roster03b.mdb'
   'admin'  HASH(0x191ef94))
  
   Also, I get a Dr. Watson on the NT machine saying Perl.exe choked.
  
   Any suggestions?
  
   Thanks,
   Pete
  
   -Original Message-
   From: Jeff Urlwin [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, March 12

RE: MS Access/CGI/Apache on WinNT questions

2002-03-11 Thread Jeff Urlwin

That, unfortunately, can be a bad message because of the way that DBD::ODBC
handles opening the database.  What's happening is that DBI can't open the
database using the DSN-less style open (SQLDriverConnect) which fails and
then tries to call SQLConnect, which expects a 32? character or less DSN.  I
hope to make this better in the future...

In the mean time, I'm going to guess that this may work from the command
line and not from the CGI.  If that's not the case, this may or may not
apply.
Check the share name fssdata and ensure it's accessible from the username
starting the web service (make sure the web server is not being started as
local system, either, as that will have NO access to the network).

IF that doesn't work, set a trace file and set the DBI tracing level to 4
(or above) and post it back here.

Jeff


 Hi,
 I hope other people have been successful at getting CGI scripts
 running that
 access MS Access because I haven't.  Here is a snippet of code that I am
 trying to get to work:

 #!d:/perl/bin/perl -wT

 use DBI;

 my $dsn = driver=Microsoft Access Driver
 (*.mdb);dbq=nrent01\\fssdata\\Roster03b.mdb;
 my $dbh = DBI-connect(DBI:ODBC:$dsn,admin,xyzzy) ||
   print BRError Opening Database: $DBI::errstr\n;

 But I get this message:

 Error Opening Database: [Microsoft][ODBC Driver Manager] Invalid string or
 buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1)

 Am I doing something amazingly stupid and just can't see it?  Is there a
 better way to get to an MS Access database?

 Please help!

 Thanks,
 Pete MacGown






Re: Fw: RE: MS Access file - accessing from Linux?

2002-01-18 Thread Nick Gorham

About-tw.com §K¶O¤H¤O»È¦æ wrote:

 You should use the openlink sdk connect to windows.Use the Multi-tie version of 
oprnlink software and SDK.

 Download the l3br.taz ,l3ko.taz ,l3kuz.taz ,l3oc.taz and install.sh 
for linux.And remeber setup the $ENV before you make.

 Download the ntbr.zip for windows. On windows,you should install the MSDE to 
transfer the access(*.mdb) to MS-SQL .Then configure the ODBC DSN .

 I just do it by this way. But the problem is I can't directly connect to the access 
database via DBD-ODBC from linux .It need to transfer to MS-SQL style.

 Hope this will help you a little bit. If you find out the other way to connect 
access database, please let me know.

 Regards,
 Tom Wu
 [EMAIL PROTECTED]


As someone else has mentioned a commercial solution our (Easysoft) ODBC-ODBC bridge 
will allow you to connect to the access ODBC driver and from there to the
..mdb.

This does require the mdb to be on a windows box, no one has a full spec for the mdb 
files, so  a direct driver is not possible at the moment.

--
Nick Gorham
Easysoft Ltd






Re: MS Access Too Few Parameters Error Help

2001-11-01 Thread Bart Lateur

On Thu, 01 Nov 2001 11:03:56 -0800, Alan Hogue wrote:

I am trying to execute an update to an Access database. The statement
has two placeholders, and I put two variables between the parentheses in
the execute statement, and yet Access tells me it expects 3 parameters.

This behaviour has had me baffled for a long while, too. It is typical,
as I've mentioned here before, for when you mistyped a field name.

It looks as if Access thinks of unknown field names as parameters, as it
does when you run such a query in Access.

-- 
Bart.



RE: MS Access Driver for Linux

2001-10-02 Thread Jeff Urlwin

Please review the dbi-users mailing list archives.  There are plenty of
answers to this and similar questions there.

The short answer is that there is no direct Linux driver for MS Access.  You
can:
use DBI proxy and have DBI installed on an NT machine
use EasySoft's ODBC bridge (http://www.easysoft.com)
use OpenLink's ODBC bridge (http://www.openlinksw.com)

Jeff

 Hi!
 I managed to successfully install DBI, DBD:ODBC and iODBC. Now all I
 need is a MS Access driver for linux (to access a locally stored dbd).
 You have a DSN-less example provided in the man. That's what I'm trying
 to do. Do you have any info as to where I can download a MS Access Driver?

 Thanks in advance.
 -Dmitry

 -//-
 Dmitry S.M.
 /* Reality is just another convincing dream */


 ___
 Check out TELUS Mobility to find out how you can get free
 wireless email.  Visit www.telusmobility.com





RE: MS-Access, timestamp, input/update problems

2001-08-30 Thread Jeff Urlwin


 Following situation: I'm using DBI and MS-Access, and my tables contain
 timestamp fields. I have a number of variables that need to either be
 inputted or updated into the table, and my statement looks like this:


 #Update:
 $state = update table set var1 = ?, var2 = ? where primkey = ? ;

 #Insert:
 $state = insert into table (var1, var2, var3) values(?,?,?) ;


 #Let's assume that var1 is an varchar, var2 is a date/time, and var3
 #is an integer.

 $var1 = bla bla bla ;
 $var2 = 2001-8-30 ;
 $var3 = 4711 ;

 # Since I've already had to deal with inputting longbinaries, I've taken
 # the time to determine what data type Access is going to be expecting
 # for the various fields, and this information has been jammed into a
 # href that has the field names as keys, and the data type as values.
 # I then do a manual bind_param on the statement handle for each field.

 $sth = $dbh-prepare($state) ;

 $sth-bind_param(1, $var1,$data_types-{var1}) ;
 $sth-bind_param(2, $var1,$data_types-{var2}) ;
 $sth-bind_param(3, $var1,$data_types-{var3}) ;

 $sth-execute ;

 # This all works just dandy for updates; but inserts bomb out with
 # the following trace info:

- bind_param for DBD::ODBC::st (DBI::st=HASH(0x19f2668)~0x1b13cf8 7
 '2001-8-30' 11)

 bind 2 == '2001-8-30' (attribs: )

 bind 2 == '2001-8-30' (size 16/17/0, ptype 4, otype 1)

 bind 2: CTy=1, STy=TIMESTAMP, CD=16, Sc=16, VM=16.
 - bind_param= 1 at DBIAnzeige.pm line 115.
 - execute for DBD::ODBC::st (DBI::st=HASH(0x19f2668)~0x1b13cf8)

 dbd_st_execute (for sql f30285504 after)...
 st_execute/SQLExecute error -1 recorded: [Microsoft][ODBC Microsoft Access
 Driver]Ung¸ltiger Zeichenwert f¸r  Konvertierungsangabe. (null)
 (SQL-22005)(DBD: st_execute/SQLExecute err=-1)
 !! ERROR: -1 '[Microsoft][ODBC Microsoft Access Driver]Ung¸ltiger
 Zeichenwert f¸r  Konvertierungsangabe. (null) (SQL-22005)(DBD:
 st_execute/SQLExecute err=-1)'


 After grubbing through the various newsgroups, I've also tried
 settin $var2
 to '{d 2001-8-30 }', but that didn't change anything.

Try looking at t\09bind.t in the DBD::ODBC distribution.  Let me know if
that doesn't show you how to do it.  I think {ts -mm-dd hh:mm:ss} is
the correct timestamp format.

Regards,

Jeff


 Heyelp!


 --
 --
Mit den besten Grüßen

  Carl K. Cunningham
  Roberts´ interactive GmbH
 --
 --
 Heinrich-Schütz-Allee 29 Tel 0561.93893-31   [EMAIL PROTECTED]
 34131 Kassel Fax 0561.93893-39   http://www.roberts.de
 --
 --






RE: MS Access

2001-06-01 Thread Gregory_Griffiths

Try using DBI::Proxy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 01 June 2001 11:20
 To: [EMAIL PROTECTED]
 Subject: MS Access
 
 
 Dear Friends,
 
 I would like to access Microsoft Access database file ie 
 .mdb, through
 perl under Unix/ Linux platform. Please guide me whether this 
 is possible
 or not with some resources.
 
 Regards
 Suresh Kannan
 
 




Re: MS Access

2001-06-01 Thread Bart Lateur

On Fri, 1 Jun 2001 15:50:04 +0530 (IST), Suresh Kannan wrote:

I would like to access Microsoft Access database file ie .mdb, through
perl under Unix/ Linux platform. Please guide me whether this is possible
or not with some resources.

Not directly. You can connect to a Windows machine which runs the Access
db server.

-- 
Bart.



RE: MS Access

2001-06-01 Thread Sterin, Ilya

I hope you plan on having Access on win32 :-)  If you want to access the
Access db on win32 from Unix/Linux, must install third party ODBC software
and connect through DBD::ODBC.  You can also use
DBD::Proxy/DBI::ProxyServer.


Ilya Sterin 

-Original Message-
From: Suresh Kannan
To: [EMAIL PROTECTED]
Sent: 06/01/2001 4:20 AM
Subject: MS Access

Dear Friends,

I would like to access Microsoft Access database file ie .mdb,
through
perl under Unix/ Linux platform. Please guide me whether this is
possible
or not with some resources.

Regards
Suresh Kannan



Re: MS Access

2001-06-01 Thread Julio Santiago

Install DBI
Install DBD-ODBC

Use a DSNLess Connction


On Fri, 1 Jun 2001 15:50:04 +0530 (IST), Suresh Kannan wrote:

 I would like to access Microsoft Access database file ie .mdb, 
through
 perl under Unix/ Linux platform. Please guide me whether this is possible
 or not with some resources.



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: MS ACCESS Date Fields

2001-04-18 Thread Steve Howard

I'm not positive if your actual statement looks like your model you gave to
us, but the main thing I see wrong with your model is how you are using
BETWEEN. If you have the Northwind Traders example database, here is an
example query to do basically the same thing:

SELECT * FROM Orders
WHERE RequiredDate BETWEEN '01/01/1996' AND '08/15/1996'


See if that syntax works better for you. If it's something more than that,
reply back, and I'm sure we can get that working.


Steve Howard.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 2:23 PM
To: [EMAIL PROTECTED]
Subject: MS ACCESS Date Fields


Hello,
i'm using Perl/DBI/CGI to connect to an MS ACCESS
database on the same
server. I can use SELECT and fetch data and pass it to
the browser, works fine. But
now I need to use some kind of BETWEEN sql statement that
will let me filter
records for a specific period of time. Something like:
"SELECT * from table
WHERE x=y AND date x BETWEEN y". I don't know how to use
the filter with
the ACCESS dates records. I am also using the Format
Format(tbl1.date,
'mm-dd-yy') command to get ride off the extra 00:00:00
that I would get if I don't
use format.
Please any ideas?

Thanks,
Miguel




RE: MS Access

2001-03-20 Thread Morag K. Smith

Actually, you don't even need to set up the DSN ahead of time.  Something 
like this will make the connection to an MS Access file on a Windows platform.

 use DBI;
 require DBD::ODBC;
 my $source_file = "i:\\Data\\Hanford\\Databases\\Hanford.mdb";
 my $con_str = "dbi:ODBC:driver=Microsoft Access Driver (*.mdb);"
 . "dbq=$source_file";
 my $dbh=DBI-connect($con_str, '', '')
 or die "Error 
connecting:  $DBI::errstr\n";

 From which point $dbh will work like the usual DBI database handle.

Morag

At 06:49 PM 3/19/01 -0600, Steve Howard wrote:
I actually use dbd::odbc quite often to access an Access database (Although
I am usually migrating something OFF of the Access database rather than
using Access). It's not really any trick. You need to set up a DSN in your
ODBC Data Sources. That is very easy if you are on an MS platform (Just In
Case - It's in your control panel). If you are on a Linux platform, you can
get the iODBC drivers to access an Access database.

Once you get the DSN configured, and pointing to the Access database you
wish to access, all there is to it code wise is something like this:

   use DBI;
   my $dsn   = "dsn_name";
   my $database  = "DBI:ODBC:$dsn";
   my $db_user   = "";
   my $db_password   = "";

   # connect to the Access db.
   my $dbh = DBI-connect($database,$db_user,$db_password);

You should be there.


Steve Howard

-Original Message-
From: Michael A. Chase [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:06 PM
To: Alex; [EMAIL PROTECTED]
Subject: Re: MS Access


Microsoft provides ODBC drivers for Access.  That should mean you can use
DBD::ODBC with DBI to work with Access.  Exactly how useful this is for you
depends on you platform.

Without knowing what you have already tried, and what problems you had, it
will be difficult for anyone on the list to make any suggestions.

--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Alex" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 19, 2001 11:31 AM
Subject: MS Access


  Sorry to bother you but I feel pretty dumb by searching the net and
  reading page after page without understanding anything. I use perl and
  mysql alot and I would like to access a microsoft Acess MDB file just
  like I access a mysql database.
 
  What would I have to do? I just don't get it. Every driver I installed
  just gives me new hints an trying other installs and so on. Is there any
  page that explains actually what to do? I can't be the first person with
  this problem.


Morag K. Smith
NIS-5 Safeguards Science and Technology
Mail Stop E540
Los Alamos National Laboratory
Los Alamos, NM 87545
Voice:  (505) 667-3080
FAX:  (505) 665-4433




Re: MS Access

2001-03-19 Thread Michael A. Chase

Microsoft provides ODBC drivers for Access.  That should mean you can use
DBD::ODBC with DBI to work with Access.  Exactly how useful this is for you
depends on you platform.

Without knowing what you have already tried, and what problems you had, it
will be difficult for anyone on the list to make any suggestions.

--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Alex" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 19, 2001 11:31 AM
Subject: MS Access


 Sorry to bother you but I feel pretty dumb by searching the net and
 reading page after page without understanding anything. I use perl and
 mysql alot and I would like to access a microsoft Acess MDB file just
 like I access a mysql database.

 What would I have to do? I just don't get it. Every driver I installed
 just gives me new hints an trying other installs and so on. Is there any
 page that explains actually what to do? I can't be the first person with
 this problem.





RE: MS Access

2001-03-19 Thread Steve Howard

I actually use dbd::odbc quite often to access an Access database (Although
I am usually migrating something OFF of the Access database rather than
using Access). It's not really any trick. You need to set up a DSN in your
ODBC Data Sources. That is very easy if you are on an MS platform (Just In
Case - It's in your control panel). If you are on a Linux platform, you can
get the iODBC drivers to access an Access database.

Once you get the DSN configured, and pointing to the Access database you
wish to access, all there is to it code wise is something like this:

  use DBI;
  my $dsn   = "dsn_name";
  my $database  = "DBI:ODBC:$dsn";
  my $db_user   = "";
  my $db_password   = "";

  # connect to the Access db.
  my $dbh = DBI-connect($database,$db_user,$db_password);

You should be there.


Steve Howard

-Original Message-
From: Michael A. Chase [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:06 PM
To: Alex; [EMAIL PROTECTED]
Subject: Re: MS Access


Microsoft provides ODBC drivers for Access.  That should mean you can use
DBD::ODBC with DBI to work with Access.  Exactly how useful this is for you
depends on you platform.

Without knowing what you have already tried, and what problems you had, it
will be difficult for anyone on the list to make any suggestions.

--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Alex" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 19, 2001 11:31 AM
Subject: MS Access


 Sorry to bother you but I feel pretty dumb by searching the net and
 reading page after page without understanding anything. I use perl and
 mysql alot and I would like to access a microsoft Acess MDB file just
 like I access a mysql database.

 What would I have to do? I just don't get it. Every driver I installed
 just gives me new hints an trying other installs and so on. Is there any
 page that explains actually what to do? I can't be the first person with
 this problem.