This is referring to the ODBC name. you set this under control panel>administrative tools>Data Sources ODBC. Once you define your name - this is the name you supply for DSN. HTH
Ken Barker IT Lead Americall Group, Inc 314-213-7927 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Craig Cardimon Sent: Tuesday, August 23, 2005 2:42 PM To: perl-win32-users@listserv.ActiveState.com Subject: Win32::ODBC -- is the DSN a server or DB or table? When using Win32::ODBC, what exactly is the DSN or "Data Source Name?" I got this from the web: *** Creating the ODBC data source: An ODBC data source name(DSN) contains the connection information to access a database. It can be created and configured via the ODBC Data Source Administrator: * On machines running Microsoft Windows 2000 or Windows XP, create the ODBC data source by clicking: Start->Settings->Control Panel->Administrative Tools->Data Sources->System DSN Select the IBM ODBC Driver and choose a catalogued database (such as "SAMPLEDB")to be associated with the DSN. *** That's all well and good, but won't work for me. What seems to work is when I use a database table name as the DSN. For instance, this is the logic that functions: my $database_handle_text = new Win32::ODBC("DSN=Contracts;UID=perl;PWD=saturn") or die Win32::ODBC::Error(); my $statement_text = "INSERT INTO Contracts (ContractTerms, Licensee, Licensor, Status, AgreementType, SIC, Source, ParentRefnum) VALUES (" . $submission_string_document . ")"; As you can see, I use the table Contracts as the DSN. The table Contracts is in the database Bob, but if I use Bob as the DSN, the logic fails. This is the code that fails: my $database_handle_text = new Win32::ODBC("DSN=Bob;UID=perl;PWD=saturn") or die Win32::ODBC::Error(); my $statement_text = "INSERT INTO Contracts (ContractTerms, Licensee, Licensor, Status, AgreementType, SIC, Source, ParentRefnum) VALUES (" . $submission_string_document . ")"; As I'm connecting to one SQL Server database on one server, shouldn't I be able to use the same connection string to access all the databases on that server for which I have permission? -- Craig --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0534-1, 08/23/2005 Tested on: 8/23/2005 3:41:54 PM avast! - copyright (c) 1988-2004 ALWIL Software. http://www.avast.com _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ______________________________________________________________________ This e-mail has been scanned by MCI Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on MCI's Managed Email Content Service, visit http://www.mci.com. ______________________________________________________________________ _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs