473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access MS-SQL Database Using Perl on Windows

2 New Member
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('Databa seName','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 4218
KevinADC
4,059 Recognized Expert Specialist
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 New Member
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 Recognized Expert Specialist
Awesome! Good job!
Apr 5 '07 #4
osariel
1 New Member
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
eWish
971 Recognized Expert Contributor
DBD::ODBC documentation
DBI documentation
Jan 13 '08 #6

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

Similar topics

8
3010
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. But the the same VBA code that works in Word fails in MS Access. Are there any differences in how VBA in MS Access use COM objects? Should a COM...
2
1892
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 cannot see them in the task bar and you have to alt-tab to flick through them.
11
1840
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 do you i get more information on all the references available? Are there any that I should be using / should be avoiding (I know about the DAO...
1
6353
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". Do you know where to download it ? Thanks and sorry for this bad english.
20
3314
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 speed. I like books with practical exercises, and also with test questions (like cert books) *2*
92
7611
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 to find out who it is that actually wants to get rid of it, but I can't find anyone who will admit to trying to get rid of it. Nevertheless, I'm...
0
1866
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 Access file (Put the MS Access file in the server), then it works. I did that. But, I want to know whether or not we can use ASP code to open the MS...
37
5200
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 would you even continue to use Access as a backend when you have a much superior option in SQL express? What about as a future front-end...
3
13289
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 table into a DB for which I have read/write/delete authority. I have verified the authority in the source DB - ad nauseum - it works. Tested the table...
1
2247
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 a table on a webpage. This code generates the field1 value on the original table. If Request.querystring("mode") = "table1" then userID =...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.