RE: Win32::ODBC Question

2003-08-01 Thread Farrington, Ryan
Title: RE: Win32::ODBC Question





I think the best way to do this would be to hit the registry and look at ODBC.ini 


-Original Message-
From: Martin, Stanley G [GMG] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 01, 2003 10:50 AM
To: perl-win32-users (perl-win32-users)
Subject: Win32::ODBC Question



I have to move a ton of ODBC Connections from one box to another and was wondering if in this module there is a way to get all the attributes for a particular ODBC Connection so that I can turn around and insert it onto the other. I have Dave Roth's Standard Extensions book, but can't find anything that pulls all this info out, just how to put it in.

Stanley G. Martin
System Administrator
Sprint - EIS3 Customer Care 
[EMAIL PROTECTED]





___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





Re: Win32::ODBC Question (Oracle)

2002-09-25 Thread Thomas R Wyant_III


[EMAIL PROTECTED] wrote:

 I'm trying to get Information about a spezific table in an Oracle
 with the command

 'describe table_name; '

 This command works within SQL-PLus and other Tools but I get the
 error message: Ora-00900: invalid SQL statement when I use it
 within a perl-script using a Win32::ODBC connection.

 Does someone know a solution , maybe to use a DBD, DBI module or
 a different statement to get information about the table definition?

You don't say what information you want about the table. If you want to
know what columns are in the table, and what data types are in the columns,
you perform a select against the table, and then pull the data out of the
selection results. If you don't want any data at this point, the usual
dodge is to specify a where clause that is never satisfied. In fact, the
usual dodge is

select * from your_table where 1 = 0

I don't know of any better way under DBI, but you need to know less about
your data types if you use DBI, because it supports placeholders. So
instead of generating the entire text of a query, and worrying about
whether values need to be quoted, and if so how to escape any embedded
quotes, you just put a question mark in the query, and provide the value
when the query is executed.

Tom Wyant



This communication is for use by the intended recipient and contains 
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as E-Contract Intended,
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portuges  Japanese  Chinese  Korean

http://www.DuPont.com/corp/email_disclaimer.html


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Win32::ODBC Question (Oracle)

2002-09-25 Thread Peter van der Goes

DESCRIBE is not a SQL command, it's a SQL+ command IIRC. The Oracle ODBC
drivers don't know anything about DESCRIBE, because it's not a SQL
command.
(Warning - based on recollections of two years ago when I actually *worked*
for a living)

- Original Message -
From: Thomas R Wyant_III [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 8:45 AM
Subject: Re: Win32::ODBC Question (Oracle)



 [EMAIL PROTECTED] wrote:

  I'm trying to get Information about a spezific table in an Oracle
  with the command

  'describe table_name; '

  This command works within SQL-PLus and other Tools but I get the
  error message: Ora-00900: invalid SQL statement when I use it
  within a perl-script using a Win32::ODBC connection.

  Does someone know a solution , maybe to use a DBD, DBI module or
  a different statement to get information about the table definition?

 You don't say what information you want about the table. If you want to
 know what columns are in the table, and what data types are in the
columns,
 you perform a select against the table, and then pull the data out of the
 selection results. If you don't want any data at this point, the usual
 dodge is to specify a where clause that is never satisfied. In fact, the
 usual dodge is

 select * from your_table where 1 = 0

 I don't know of any better way under DBI, but you need to know less about
 your data types if you use DBI, because it supports placeholders. So
 instead of generating the entire text of a query, and worrying about
 whether values need to be quoted, and if so how to escape any embedded
 quotes, you just put a question mark in the query, and provide the value
 when the query is executed.

 Tom Wyant



 This communication is for use by the intended recipient and contains
 information that may be privileged, confidential or copyrighted under
 applicable law.  If you are not the intended recipient, you are hereby
 formally notified that any use, copying or distribution of this e-mail,
 in whole or in part, is strictly prohibited.  Please notify the sender
 by return e-mail and delete this e-mail from your system.  Unless
 explicitly and conspicuously designated as E-Contract Intended,
 this e-mail does not constitute a contract offer, a contract amendment,
 or an acceptance of a contract offer.  This e-mail does not constitute
 a consent to the use of sender's contact information for direct marketing
 purposes or for transfers of data to third parties.

  Francais Deutsch Italiano  Espanol  Portuges  Japanese  Chinese  Korean

 http://www.DuPont.com/corp/email_disclaimer.html


 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs