DBD::ODBC Connecting without DSN from Win32by sparkyichi (Deacon)
|on Jul 25, 2002 at 21:11 UTC||Need Help??|
This is not a question but more of general information that I thought might be useful to some people. I had looked all over for this information and could not find it or it might have been that I just didn't know where to look.
I am trying to execute SQL queries from a Win32 workstation or web server. I did not want to create a ODBC DNS entry and for portability reason I did not want to use WIN32::ODBC. There is an example in the DBD::ODBC pod for MSSQL that is close to what you want. This node is also helpful.
The first thing you want to do is find the MS driver that you will have to use. You can find this by going to you control panel -- Data Sources In the drivers tab. You will find information you looking for in the name column. In my case it was "Microsoft ODBC for Oracle." This is the driver you will want to use such as the example in DBD::ODBC, "SQL Server." You can then complete out the rest of the example with your information: server name, user name and password with the exception of "database." I could not find anything to put there that did not cause the following error:
Microsoft ODBC Driver Manager Invalid string or buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1)
By luck I found out that you do not need to use this, at least when you are connecting to Oracle.
I hope that this will be able to help some people out.
Update: Fixed minor error.