473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Access MS-SQL Database Using Perl on Windows

2
I'm relatively new programming on Windows. I need some pointers badly. On Unix, Sybase::DBlib has worked fine for me. I tried to use DBI, DBD::ODBC installed on a server, but I get the following error:

DBI connect('DatabaseName','userid',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1)

I searched around, but most I've found seem to be about Unix not Windows. It seems ODBC is needed if I want access Sybase database. But I have no idea about accessing MS-SQL database within Windows.

So my question is how do I query SQL database on Windows using perl? Does using DBI, DBD::ODBC make sense? If yes, how do I fix the problem?

Much appreciated!
-Bob
Apr 5 '07 #1
5 4205
KevinADC
4,059 Expert 2GB
You probably want to use Win32::ODBC, I am pretty sure it comes standard with activestate perl if thats what you are using. Open the activestate/activeperl folder on your local PC and read the documentation.
Apr 5 '07 #2
rdl735
2
You probably want to use Win32::ODBC, I am pretty sure it comes standard with activestate perl if thats what you are using. Open the activestate/activeperl folder on your local PC and read the documentation.
Thank you, Kevin.
I tried it out and it sure worked. In the process I read about DSNless connection, and I went back to use DBI DBD::ODBC, it also worked. I prefer DSNless connection, since it does not require to configure a DSN, this is a cleaner solution when the program is released to users.
Apr 5 '07 #3
KevinADC
4,059 Expert 2GB
Awesome! Good job!
Apr 5 '07 #4
guys,

I am having same ODBC issues connecting to MSSQL server within perl, i see that you guys got the solution here. Please can you let have the exact syntax for WIN32::ODBC connection string. Very much appreciated
Jan 13 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Patrik Sj?gren | last post by:
Hi, We have a COM object, which in turn use DDE to communicate with another application of ours. Access to this COM object works fine from C++, Visual Basic applications, VBS and VBA from MS Word....
2
by: Maryam | last post by:
Is a split window possible for an MS DOS program and MS Access program?? If so how??? When you run a DOS programn it covers the whole of the PC screen and if you have other applications you...
11
by: WindAndWaves | last post by:
Hi Gurus I have recently discovered references in the VB section of MS Access, however, when choosing references, I noticed that there are more than who knows how many options. How and/or where...
1
by: B&C | last post by:
Hello, I'm searching a runtime to read access databases on computers which doesn't have access installed. I found this runtime for access 2000, but I would prefer to use the access 97 "reader"....
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
92
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried...
0
by: accessman2 | last post by:
I have a question. I want to open the MS Access file with user-level Security. I know that if I do NOT setup user-level Security in the MS Access file, and create the table for login in the MS...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
3
by: nzaiser | last post by:
Hello! This is my first time asking a question here, so please bear with me if I seem 'unconventional!' My issue is this..... OS: Windows_NT App: MS Access 2000 (also in 2003) ODBC linked...
1
by: katwheels | last post by:
I need to convert a data element from a web page table into an MS Access input parameter and then run another MS Access query. I have an ASP web page that generates an MS Access query and creates...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.