Re: perl DBI on windows 64



It seems you don't have a valid ODBC data source named xxxsql01. If you are running your script from a web server, it has to be a system data source, else it may also be a user data source.

And by the way: Are you sure you want to connect as "sa"? That account usually has too many privileges. Create a distinct user for your application.

Alexander

On 13.03.2008 16:42, Ramakrishna Raju wrote:
Hi,



I am trying to connect to SQL Server 2005 on a windows 64bit
machine from the same machine. And I get this error message:



DBI connect(xxxsql01,'sa',...) failed: [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified (SQL-IM002)
at a.pl line 10

Can't connect to dbi:ODBC:xxxsql01: [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified (SQL-IM002)
at a.pl line 10.



The Perl script is:

#=======================================================

use strict;



use DBI;



my $data_source = q/dbi:ODBC:xxxsql01/;

my $user = q/sa/;

my $password = q/xxxxxx/;



# Connect to the data source and get a handle for that connection.

my $dbh = DBI->connect($data_source, $user, $password)

or die "Can't connect to $data_source: $DBI::errstr";

#=========================================================



If I run this script from a 32-bit windows machine, it is
able to connect successfully.



I applied the latest DBD-ODBC 1.15 version (Martin J Evans)
and it still is a problem. Is there any fix or work around for this
issue?





Appreciate your time,



Thanks,

Ramakrishna Raju ( "Raju" )

rraju@xxxxxxxxxxxxxx <mailto:rraju@xxxxxxxxxxxxxx>




DISCLAIMER: NOTICE REGARDING PRIVACY AND CONFIDENTIALITY

This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. TJM Proprietary Trading, LLC ("TJMPT") may, at its discretion, monitor and review the content of all e-mail communications. TJMPT is a registered joint back office broker dealer with the Chicago Board of Options Exchange "CBOE". TJMPT's office is located at 318 W. Adams Floor 9, Chicago, IL 60606. For more information about TJMPT, please call us at (312)-432- 5100 or fax (312)-432-4498.


--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/


.



Relevant Pages

  • Re: SSMS: create datasource and datasource view
    ... Yes - use the "Script" button on top of the process dialog in SSMS to ... There are also processing templates in the template ... but not Data source, Data source view, Data mining structure, Data ... In case you already have a database on Analysis services chose the ...
    (microsoft.public.sqlserver.datamining)
  • Re: Mail Merge relative reference to data source
    ... A Word .doc can only contain one data source as far as I know, so the only way you can modify it is to provide some SQL that does the simple sorts and filters supported by Word's very simple internal SQL dialect. ... An Excel .xls workbook is much more like a "database" that can have several "tables". ... However, if you just specify the workbook name in the OpenDataSource Name parameter, you will probably see the data from the first sheet in the workbook, and you ... completes the script without complaint. ...
    (microsoft.public.word.vba.general)
  • Re: Mail Merge relative reference to data source
    ... Dim strDataSource As String ... Dim objMMMD As Word.Document ... Mail Merge Helper the data source is still blank. ... place- separate modules for the disconnect script and connect script. ...
    (microsoft.public.word.vba.general)
  • hta security with adodb.stream
    ... I have an old script (hosted in MSHTA) that isn't working anymore on some ... pressing yes results in: ... 'This page is accessing a data source on another domain. ...
    (microsoft.public.scripting.wsh)
  • Re: hta security with adodb.stream
    ... > pressing yes results in: ... > 'This page is accessing a data source on another domain. ... I always thought that MSHTA has a different security ... > - the script is running from a local harddisk. ...
    (microsoft.public.scripting.wsh)