Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If you look at the Description section of Win32::OLE's documentation, the first two sentences are: "This module provides an interface to OLE Automation from Perl. OLE Automation brings VisualBasic like scripting capabilities and offers powerful extensibility and the ability to control many Win32 applications from Perl scripts."

Basically, that means you're not going to be able to run queries directly against a database using that module. Instead, it would allow you to control Windows applications (such as Microsoft Office products). If you want to run queries directly against a database, you might want to look into Win32::ODBC and/or DBD::ODBC.

Although it sounds like you're not allowed to install other modules, that may not be an issue. Here's info on 3 popular Perl distributions for Windows:

Also, I think there's more to your code than what you posted. In your posted code, it looks like $conn and $rs are objects, but those objects are not defined or created. And your posted code has an unfinished if statement. When I try running your code (with the if statement commented out), it bails on the $conn->open; line with the following error message: Can't call method "open" on unblessed reference at test.pl line 3.

In other words, your posted code doesn't reproduce the error messages that you say that you're seeing. Perhaps if you can share more information on your limitations and what you're trying to do or maybe some reduced code that can reproduce your error message, others might be able to help you out more.


In reply to Re: Perl OLE32 MSSQL SELECT dateadd function results in “Cursor type changed” error by dasgar
in thread Perl OLE32 MSSQL SELECT dateadd function results in “Cursor type changed” error by newbieperlperson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-03-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found