Solved

DSN less to connect to MS SQL in Win32ODBC

Posted on 2001-07-11
4
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl script to parse log and delete the file 17 183
PERL get the value for query 4 163
remove duplicates from the csv file 13 124
perl CPAN issue 3 131
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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…

752 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