Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

RE: ODBC question

by buzzcutbuddha (Chaplain)
on May 10, 2000 at 16:00 UTC ( #10934=note: print w/ replies, xml ) Need Help??


in reply to ODBC question

BBQ gives good guidance on this issue. However, if you really want
to stick to Win32 Operations, and you think that you will never
ever move beyond it, you can use ADO, or Active X Data Objects.
ADO is an easy way to use Microsoft's OLE DB API. If you have
coded in ASP or VB, then you will find ADO pretty easy.

An example:

use Win32::OLE; use Win32::OLE::Const 'Microsoft ActiveX Data Objects'; my $conn = Win32::OLE->new('ADODB.Connection'); $conn->open('FooConn'); $sqlString = "INSERT INTO Foo(Bar, Baz) VALUES (\'$Bar\', \'$Baz\');"; $conn->execute($sqlString); print "\n\n\tPfft: ", Win32::OLE->LastError(), "\n" if (Win32::OLE->La +stError()); exit if (Win32::OLE->LastError());

The benefit to ADO is that you can connect it to any database
does support ODBC...but for total portability, I'd suggest you follow
BBQ's advice.


Comment on RE: ODBC question
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://10934]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-08-21 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (135 votes), past polls