RE: Win32::ODBC

2009-05-07 Thread Schwartz, Peter (JPMC)
Yes.  The sql works fine against the DB directly.  It's a stored
procedure with output variables.  I can run the contents of the stored
proc within my perl code, but not the proc itself.  I'm wondering if
it's a driver issue.

 

 

Peter W Schwartz

Vice-President

IB Technology - Prime Brokerage / JP Morgan Chase 

(973) 793-7407

  _  

From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Paul Rogers
Sent: Wednesday, May 06, 2009 9:18 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: RE: Win32::ODBC

 

Have you attempted to execute this SQL code in DB2 prior?  In other
words skip the perl middleman altogether and see if it's something with
your SQL statement.

 

Paul ---

 

From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Schwartz, Peter (JPMC)
Sent: Wednesday, May 06, 2009 5:45 PM
To: Paul Rogers; perl-win32-users@listserv.ActiveState.com
Subject: RE: Win32::ODBC

 

Nope.  The results are the same error.  Could it have to do with the
stored procedure having output variables?

 

 

Peter W Schwartz

Vice-President

IB Technology - Prime Brokerage / JP Morgan Chase 

 



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  ___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC

2009-05-06 Thread Paul Rogers
Have you attempted to execute this SQL code in DB2 prior?  In other words
skip the perl middleman altogether and see if it's something with your SQL
statement.
 
Paul ---
 
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Schwartz, Peter (JPMC)
Sent: Wednesday, May 06, 2009 5:45 PM
To: Paul Rogers; perl-win32-users@listserv.ActiveState.com
Subject: RE: Win32::ODBC
 
Nope.  The results are the same error.  Could it have to do with the stored
procedure having output variables?
 
 
Peter W Schwartz
Vice-President
IB Technology - Prime Brokerage / JP Morgan Chase 
 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC

2009-05-06 Thread Paul Rogers
> -Original Message-
> From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-
> > I'd suggest you strongly consider switching to DBI/DBD::ODBC (1.21).
> > Win32::ODBC is obfuscated.
> 
> I believe you mean "obsolete" (should not be used because something
> better is available), not "obfuscated" (made hard to read).

Yes...you're absolutely right. The word is _obsolete_, not "obfuscated". :-)
 
> With that change I generally agree. OTOH, if you want to create DSNs,
> then DBD::ODBC is not gonna help, Win32::ODBC will.

DSNs can also be created by directly writing to the registry as well (using
any number of registry editing modules).  But I digress.

Paul ---



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC

2009-05-06 Thread Jenda Krynicky
From:   "Paul Rogers" 
To: 
Subject:    RE: Win32::ODBC
Date sent:  Wed, 6 May 2009 14:43:53 -0400

> I'd suggest you strongly consider switching to DBI/DBD::ODBC (1.21).
> Win32::ODBC is obfuscated.

I believe you mean "obsolete" (should not be used because something 
better is available), not "obfuscated" (made hard to read).


With that change I generally agree. OTOH, if you want to create DSNs, 
then DBD::ODBC is not gonna help, Win32::ODBC will.

Jenda
= je...@krynicky.cz === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC

2009-05-06 Thread Schwartz, Peter (JPMC)
Nope.  The results are the same error.  Could it have to do with the
stored procedure having output variables?

 

 

Peter W Schwartz

Vice-President

IB Technology - Prime Brokerage / JP Morgan Chase 

(973) 793-7407

  _  

From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Paul Rogers
Sent: Wednesday, May 06, 2009 2:44 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: RE: Win32::ODBC

 

I'd suggest you strongly consider switching to DBI/DBD::ODBC (1.21).
Win32::ODBC is obfuscated.

 

Try with DBI/DBD::ODBC and see if results change.

 

Paul ---

 

 

From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Schwartz, Peter (JPMC)
Sent: Wednesday, May 06, 2009 2:25 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Win32::ODBC

 

I'm having problems running  a stored procedure using the Win32::ODBC
package.  I am executing the following:

sql statement: "call BSCPROC.PHCT110 ('JAG','12345670','',.7,
'2009-05-02','2009-05-03', NULL,NULL,' ', '45','petes',?,?,?,?,?)"

and I get back the following message:

Error: "-9[IBM][CLI Driver] CLI0100E  Wrong number of parameters.
SQLSTATE=0700110"

 

I've checked multiple times and am sending the correct number of
parameters.  The driver I am using is:

IBM DB2 ODBC DRIVER version 8.01.12.99

 

I have done some searching and tried things like setting AUTOCOMMIT off,
but no luck.

 

Has anyone seen this before?  

 

Thanks,

Peter

 

 

 

 

Peter W Schwartz

Vice-President

IB Technology - Prime Brokerage / JP Morgan Chase 

(973) 793-7407

 

  _  

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of securities,
accuracy and completeness of information, viruses, confidentiality,
legal privilege, and legal entity disclaimers, available at
http://www.jpmorgan.com/pages/disclosures/email. 



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  ___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC

2009-05-06 Thread Paul Rogers
I'd suggest you strongly consider switching to DBI/DBD::ODBC (1.21).
Win32::ODBC is obfuscated.
 
Try with DBI/DBD::ODBC and see if results change.
 
Paul ---
 
 
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Schwartz, Peter (JPMC)
Sent: Wednesday, May 06, 2009 2:25 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Win32::ODBC
 
I'm having problems running  a stored procedure using the Win32::ODBC
package.  I am executing the following:
sql statement: "call BSCPROC.PHCT110 ('JAG','12345670','',.7,
'2009-05-02','2009-05-03', NULL,NULL,' ', '45','petes',?,?,?,?,?)"
and I get back the following message:
Error: "-9[IBM][CLI Driver] CLI0100E  Wrong number of parameters.
SQLSTATE=0700110"
 
I've checked multiple times and am sending the correct number of parameters.
The driver I am using is:
IBM DB2 ODBC DRIVER version 8.01.12.99
 
I have done some searching and tried things like setting AUTOCOMMIT off, but
no luck.
 
Has anyone seen this before?  
 
Thanks,
Peter
 
 
 
 
Peter W Schwartz
Vice-President
IB Technology - Prime Brokerage / JP Morgan Chase 
(973) 793-7407
 
  _  

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of securities,
accuracy and completeness of information, viruses, confidentiality, legal
privilege, and legal entity disclaimers, available at
http://www.jpmorgan.com/pages/disclosures/email. 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::ODBC -- is the DSN a server or DB or table?

2005-08-23 Thread Ken Barker
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


Re: win32::ODBC insert error

2003-09-18 Thread Carl Jolley
On Tue, 16 Sep 2003, Mark Elliott wrote:

> I get this error:
>
> "[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored
> procedure 'insert into hosts (HOST,lastchk)
>
> When I attempt to insert a bunch of rows into a MSSQL table.  It gets data
> from a text file.
>
> Here is the code:
>
> use Win32::ODBC;
> $prox = new Win32::ODBC("DSN=wilma");
> @_ = <>;
> foreach $_(@_){
>   /(.*)\t(.*)\t(.*)/;
>   $strsql = '"insert into hosts (HOST,lastchk) VALUES
> (\''.$1.'\',\''.$3.'\');"';
>   print $strsql;
>
>   if ($prox->sql($strsql)){$prox->DumpError}
>   $prox->sql($strsql);
>   $foo = <>;}
>
> $prox->Close();
>

All your '\' strings need to be changed to '\\'.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

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


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 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



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 with Access2000

2001-06-12 Thread Andy Jennings

Ronnie

Absolutely, Yes - 2000 and 97 use different versions of the Jet database
engine and hence a different ODBC driver, although the later driver is meant
to be, somewhat, backward compatible. There is no way, that I know of, to
have the same driver accessing both types of file successfully without
either converting the file types on the fly or (sometimes) trashing the 97
db into read-only, which is little use to most people. You can sometimes,
under relatively restricted circumstances, use the driver with both types of
db's but it seems to depend on the type of actions you are taking.

For a detailed list of the known MDAC version problems you should look at
the Mickeysoft Knowledge Base - last I checked there were 22 known probs
with MDAC 2.1 and over 50 with 2.5, which I think is the version which comes
with 2000.

Now I'm not certain about this bit, but I think there may also be a problem
trying to have both the 97 and the 2000 Access ODBC driver co-exist on the
same machine, again due to having two Jet versions duking it out - this is
probably a suck-it-and-see but could have some nasty consequences so don't
try it on any machine you value running perfectly too much.

hth a bit

Andy

- Original Message -
From: "Ronnie Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 10:17 AM
Subject: Win32::ODBC with Access2000


> I am having a little difficulty with Access 2000 and ODBC.  I am using the
> script from roth.net called ODBCQRY.pl to test the ODBC setup on my
desktop.
> Using Win2000, it came with one system DSN by default called ECDCMusic
which
> pointed to a database on the local drive.  So I set up a new DSN to point
to
> this same database and bingo!  I now see two DSN in the select box on the
> first page of the cgi script ODBCQRY.pl.  It just queried for available
> DSN's.  All is well.  So I put another access database in the same folder
as
> the ECDC database and built a new DSN(I am sure it was an Access 97
> database).  All is well again.  Now I use Access 2000 to open the new
> database and save as a different file, point the DSN to the new file and I
> get the error that is cannot open the file.  Access tells me it is
> converting this file.  I have a need to view Access 2000 and Access 97
> databases.  Do I need to use a different driver?
>
> Ronnie Jones
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
>
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users