Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

RE: ODBC question

by buzzcutbuddha (Chaplain)
on May 10, 2000 at 16:00 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found