On Mon, 29 Sep 2003 22:35:10 -0700 (PDT) [EMAIL PROTECTED] wrote:
> Can someone explain why passing the parameter behave like it did or
> atleast explain the best way to pass parameters here?
>
> $dbh = DBI->connect('dbi:mysql:userdb','user', 'pw');
> $sth=$dbh->prepare("SELECT * FROM myusers whe
Can someone explain why passing the parameter behave like it did or
atleast explain the best way to pass parameters here?
$dbh = DBI->connect('dbi:mysql:userdb','user', 'pw');
$sth=$dbh->prepare("SELECT * FROM myusers where username = ?");
#this works
$sth->execute(bob) || die "SQL error: $!\n";
Justin Hopkins wrote:
I've just installed perl 5.8.1 and while trying to reinstall DBD::Informix,
I've come across this compile error on Solaris 7:
~/src/perlmod/DBD-Informix-2003.04/ make
INFORMIXC="/usr/local/bin/perl esqlcc" ESQLCC="gcc" esql -c -shared -I/usr/informix/incl/esql
-I/usr/local
On Sun, 28 Sep 2003 12:58:16 -0700, Dave Anderson wrote:
Hi Dave
> Tim, that link is dead. Also, it seems that the main thrust of the
> first article is in regards to stored procedures:
Yeah, but it's important to have such articles to educate programmers as to some of
the traps.
--
Cheers
Ron
On Mon, Sep 29, 2003 at 10:19:46PM +0100, Andy Hassall wrote:
> >
> > 23000 Integrity constraint violation SQLBulkOperations
> > SQLExecDirect
> > SQLExecute
> > SQLParamData
>
On Mon, Sep 29, 2003 at 01:58:14PM -0700, [EMAIL PROTECTED] wrote:
> Aren't the mysql sql state known. i remember coding using java.sql with
> the mysql database driver, it had alot of the error code, state, and
> messages implemented. Also, this was somewhat close to Oracle.
MySQL have recently a
>
>
> OK, I got it to work. I appreciate the help.
>
> Another question.
>
> The reason I switched to DBI is because I was having a
> problem with getting a WRITE CONFLICT error when users try to
> manually edit the records (that were inserted by the script)
> while in MS ACCESS. The recor
Hardy Merrill wrote:
> Ok, I found this link
>
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odapps.asp
>
> but I'm not sure that's ODBC 3.5.
>
> Also, this page has a table with 3 columns:
>SQLSTATE (5 digit number)
>Error - terse error description
>Can
On Mon, 29 Sep 2003 13:49:32 -0400 "Rozengurtel, Daniel"
<[EMAIL PROTECTED]> wrote:
> I have a quick question:
> Can I use a 'prepare' statement to execute later a "CREATE OR REPLACE
> VIEW..." with passing to it a specific param? I.e. something like
> that:
I'm pretty sure you can't use bind var
Aren't the mysql sql state known. i remember coding using java.sql with
the mysql database driver, it had alot of the error code, state, and
messages implemented. Also, this was somewhat close to Oracle.
Thus without having readup on DBI and DBD, I would say it should follow
the code/state standar
> Of course, in an ideal world, DBD's would all set $DBI::state
> ($h->state) to the appropriate value: "23000"
In the interest of mysql 3.2x and 4.x, are the state values dependable? In
any case, I'm interested in:
- insert failed on duplicate keys
- no data found on query
- update count as i
Ok, I found this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odapps.asp
but I'm not sure that's ODBC 3.5.
Also, this page has a table with 3 columns:
SQLSTATE (5 digit number)
Error - terse error description
Can be returned from
The 'Can be returne
Tim Bunce [EMAIL PROTECTED] wrote:
> On Mon, Sep 29, 2003 at 12:14:17PM -0400, Hardy Merrill wrote:
> > Tim Bunce [EMAIL PROTECTED] wrote:
> > > On Mon, Sep 29, 2003 at 09:32:10AM -0400, Hardy Merrill wrote:
> > > > Thomas A. Lowery [EMAIL PROTECTED] wrote:
> > > > > # Does the error
On Mon, Sep 29, 2003 at 12:14:17PM -0400, Hardy Merrill wrote:
> Tim Bunce [EMAIL PROTECTED] wrote:
> > On Mon, Sep 29, 2003 at 09:32:10AM -0400, Hardy Merrill wrote:
> > > Thomas A. Lowery [EMAIL PROTECTED] wrote:
> > > > # Does the error message contains the phrase: duplicate key
I've just installed perl 5.8.1 and while trying to reinstall DBD::Informix,
I've come across this compile error on Solaris 7:
~/src/perlmod/DBD-Informix-2003.04/ make
INFORMIXC="/usr/local/bin/perl esqlcc" ESQLCC="gcc" esql -c -shared
-I/usr/informix/incl/esql -I/usr/local/lib/perl5/5.8.1/sun4-
Hello All,
I have a quick question:
Can I use a 'prepare' statement to execute later a "CREATE OR REPLACE
VIEW..." with passing to it a specific param? I.e. something like that:
my $sth_CreateEquityIDsView = $dbh->prepare(q{
CREATE VIEW IDS_COUNT_VIEW AS (
SELECT ISID.ID_CTXT_TYP, ISS_ID
Goodman Kristi - kgoodm [EMAIL PROTECTED] wrote:
> OK, I got it to work. I appreciate the help.
>
> Another question.
>
> The reason I switched to DBI is because I was having a problem with getting
> a WRITE CONFLICT error when users try to manually edit the records (that
> were inserted by the
OK, I got it to work. I appreciate the help.
Another question.
The reason I switched to DBI is because I was having a problem with getting
a WRITE CONFLICT error when users try to manually edit the records (that
were inserted by the script) while in MS ACCESS. The records can be edited
by an UP
Tim Bunce [EMAIL PROTECTED] wrote:
> On Mon, Sep 29, 2003 at 09:32:10AM -0400, Hardy Merrill wrote:
> > Thomas A. Lowery [EMAIL PROTECTED] wrote:
> > > # Does the error message contains the phrase: duplicate key
> > > if ($dbh->errstr =~ m/duplicate\skey/i) {
> >
On Mon, Sep 29, 2003 at 09:32:10AM -0400, Hardy Merrill wrote:
> Thomas A. Lowery [EMAIL PROTECTED] wrote:
> > # Does the error message contains the phrase: duplicate key
> > if ($dbh->errstr =~ m/duplicate\skey/i) {
> ^^
> J
Sterin, Ilya (I.) [EMAIL PROTECTED] wrote:
> my $sth = $dbh->prepare("select .");
> $sth->execute();
>
> my $data = $sth->fetchrow_hashref();
>
> my $list = $data->{'Col1'};
Just personal preference for naming variables what they
contain, but it might help Krisi understand what's going
on an
my $sth = $dbh->prepare("select .");
$sth->execute();
my $data = $sth->fetchrow_hashref();
my $list = $data->{'Col1'};
Ilya
-Original Message-
From: Goodman Kristi - kgoodm [mailto:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 11:19 AM
To: '[EMAIL PROTECTED]'
Subject: New to
Hello!
I am a Win32::ODBC user and I am trying to convert to DBI. However, I am
having trouble trying to figure out how to do one thing. How can you return
a hash where you can assign the values returned to a variable.
This is the code I have from using the WIN32::ODBC module and I would like
Thomas A. Lowery [EMAIL PROTECTED] wrote:
> As long as RaiseError is turned OFF ($dbh->{RaiseError} = 0),
> you may trap the errors without evals. The error message will change
> based on the database.
>
> PostgreSQL Example:
>
> #!/usr/bin/perl -w
> #
> #
>
> use strict;
> use warnings;
> use
Fellow list users,
Pardon my incompetence in data Gathering but I can't manage to find the
exact DBI requiremnt for Mysql 4.0.14.
>From what I found it's DBI v 1.22 or higher, could someone confirm this
please?
If that is true, does it work with perl5.6.1 ? Thanks a lot.
25 matches
Mail list logo