Solved

DSN less to connect to MS SQL in Win32ODBC

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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