Solved

DSN less to connect to MS SQL in Win32ODBC

Posted on 2001-07-11
4
248 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
perl to mysql 5 130
Input from stdin for perl 6 118
Trying to use two loops in a perl script but not getting results need. 10 82
Perl script to delete older files 6 69
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

18 Experts available now in Live!

Get 1:1 Help Now