Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://10934]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-05-27 10:15 GMT
Find Nodes?
    Voting Booth?