Solved

DSN less to connect to MS SQL in Win32ODBC

Posted on 2001-07-11
4
238 Views
Last Modified: 2010-05-18
use Win32::DBIODBC;
use Win32::ADO;
use Win32::OLE;


$cmd = Win32::OLE->new( "ADODB.Command");
$con = Win32::OLE->new("ADODB.Connection");
$rs = Win32::OLE->new("ADODB.Recordset");

$con->Open("DSN=Test;UID=sa;PWD=;DBNAME=fse_sideA");


Above is the way that I connect to the MS SQL Server thru
DSN. My question is how can I use DSN less to connect ?
0
Comment
Question by:idontknow12002
  • 2
4 Comments
 
LVL 25

Expert Comment

by:clockwatcher
ID: 6274174
Try:

$con->Open("Provider=SQLOLEDB;Data Source=SQLSERVERNAME;Initial Catalog=fse_sideA;UID=sa;PWD=;");

where SQLSERVERNAME is the name of your SQL server.
0
 

Author Comment

by:idontknow12002
ID: 6274779
what is Initial Catalog ?
0
 
LVL 25

Accepted Solution

by:
clockwatcher earned 35 total points
ID: 6274820
Initial Catalog specifies the database within your SQL server that you want to use.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9482434
Nothing has happened on this question in over 12 months.
I will leave a recommendation in the Cleanup topic area that
the answer by clockwatcher be accepted.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now