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

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

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

Win32::ODBC error

Status
Not open for further replies.

gmo

Programmer
Mar 24, 2003
6
US
I have a Perl script that uses the Win32::ODBC Module to connect to an Access database. I set up a system DSN and have given the proper permissions, still I receive:

Error connecting to 'DBName' Error:[-1032][]"[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data."

Can anyone tell me what I have done wrong or have yet to do right. Thanks for the help.

Greg
 
That error is telling you that the database is already opened and was opened exclusively. Do you have this database open on the server that is housing it?

- Rieekan
 
No. This database is not open anywhere. I can't figure it out.
 
Sounds like a rights issue.
Do you have enough rights to this file on the pc that the script is running from?

If so, maybe your syntax is wrong. What does your code look like?

tgus

__________________________________________________________________
A father's calling is eternal, and its importance transcends time.
 
use Win32::ODBC;
if (!($db = new Win32::ODBC('ISDB'))){
print "Error connecting to ISDB\n";
print "Error: " . Win32::ODBC::Error() . "\n";
exit;
}

$db->Sql("INSERT INTO techissue (ticketnumber, date, practicename, contact, phone1, issuetype, explanation) " .
"VALUES ($convalue, $dtvalue, $pvalue, $nvalue, $phvalue, $prob, $dvalue)");

$db->Close();


I ran it under administrator and still got the same error. Does this info help?
 
I just can't seem to get past this issue.
 
Mike Lacey wrote a FAQ on using perl to connect to Access.

It's here faq219-1467

His examples look a little different than yours.

There are also other useful faqs.

Hope this helps!

tgus

_________________________________________________________________
A father's calling is eternal, and its importance transcends time.
 
OK. So I installed DBI and DBD::ODBC on my server and rewrote the code to follow along the lines of what Mike Lacey had. Still, I get an error when I try to connect.
There is obviously something that I am doing wrong (other than using Windows) Does anyone have any ideas? Any alternatives?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top