I have switched webhosts. I cannot get DBI and DBD working correctly from
a local directory on that host. (Readyhosting does not have installed --
and will not install -- DBI or DBD:ODBC.)
Hmmm, is the server a windows box?
If it is, just build it on your local box and FTP it up.
I have an Access database.
I've been defining field types as varchar(32). This works, although
Access doesn't appear to have a varchar, it has a text. Does DBI do the
translations or does Access understand varchar?
Also (perhaps off topic, but of great concern to me):
I'm getting these
I'm having trouble with date time in Access with DBI/ODBC
I'm trying to do this:
SELECT * FROM some_table WHERE date_time_field 11/30/99
That's giving me all dates, where:
SELECT * FROM some_table WHERE date_time_field 11/30/99
Is giving me none.
I must have done something completely
Tim Bunce wrote:
On Wed, Mar 05, 2003 at 02:36:50PM +, Volker I. Lipper wrote:
Hi Jeff,
the correct syntax in access itself would be:
#9/30/1999#
the writing of the data (mm.dd or dd.mm or mm/dd) belongs to the
system variables set on the system acess is installed on. But
I have an Access database with funny field names like: REPORT #
I forgot the advice to use square brackets [] and used double quotes
instead : REPORT #.
Now, that works fine. But is that going to cause me trouble
somewhere/sometime? Should I replace that with the square brackets, or
let it
I have these poorly named fields in an Access database: date,time
I can select/fetch these fields, but I can't insert into. I get an SQL
error.
Any ideas on a quick fix.
Jeff
How do I create an Access (the M$ product) table using DBI?
I normally just open a database handle, open a statement and run the
SQL to create the table. Because Access is file based, I tried creating
a blank some_table.mdb file for the database handle, but this did not
work.
Do I have to
Shared Hosting win2000 server, with an unresponsive tech staff. I only
have FTP privilges. Can't change hosting (I'm just a programing lackey).
I understand that there is a pure perl version of DBI. Is there a way
to install DBD::ODBC just having FTP? The last win server I was able to
PPM
Bart Lateur wrote:
Shared Hosting win2000 server, with an unresponsive tech staff.
I understand that there is a pure perl version of DBI. Is there a way
to install DBD::ODBC just having FTP? The last win server I was able to
PPM install.
Yes. Install it on your local machine, make
I tried to check out some of the latest modules for Windows, using the
URL http://xmlproj.com/PPM/. (I tried www.xmlproj.com, too.) After
some time, I get a DNS lookup error. It looks like this domain has
expired.
They were dead yesterday also. It looks like the domain is up to date:
I'm trying to get a connect with SQL Server.
I have this:
$DSN = 'driver={SQL
Server};Server=server_ip;uid=user_id;pwd=the_password;database=database_name';
$db = DBI - connect(dbi:ODBC:$DSN) || die Cannot Connect:
$DBI::errstr\n;
This is what I get:
Cannot Connect: [Microsoft][ODBC Driver
Jeff Urlwin wrote:
That's probably an old bug in DBD::ODBC, and I suspect you're using
version 0.28. If so, please upgrade. If not, please post more
specifics about your version.
Just installed it last week (ppm) and have been running Access on it
(ugh!). I would think that would be 1.01 .
Jeff Urlwin wrote:
That's probably an old bug in DBD::ODBC, and I suspect you're using
version 0.28.
Yes, It is .28, how do I make sure that 1.01 is installed?
Sorry to be such a bother...
Jeff
If so, please upgrade. If not, please post more
specifics about your version.
I've writen a lot of DBI code (CGI) for *nix/MySQL and never worried
about closing statement handles: $sth-finish(). I assumed that when the
script was done and it would tidy this up.
Is this different on the windows/Access side? Is this something I
should have been doing all along on *nix?
I'm getting a weird error when I try to update a text field (Access,
latest ODBC and DBI) sometimes:
This is a placeholder problem. Changing the script so the affected field
is not a placeholder eliminates the problem. ie: set text_field=? fails
*sometimes* while set text_field='$text_field'
I've had ODBC installed, but I'm getting this error on trying to
create a connection:
install_driver(ODBC) failed: DBD::ODBC object version 0.28 does not
match bootstrap parameter 1.01 at C:/Perl/lib/DynaLoader.pm line 225.
Compilation failed in require at (eval 6) line 3.
What does that
I'm getting this error when I try to retrieve a field that is a text
field (memo, blob, or whatever Access calls it).
(1: [Microsoft][ODBC Microsoft Access Driver]String data, right
truncated on column number 1 (touravi)
(SQL-01004)(DBD: st_fetch/SQLFetch (long truncated) err=1))
(sorry Michael, I meant to send this to the list)
---BeginMessage---
Michael A Chase wrote:
On Sat, 28 Dec 2002 14:01:28 -0500 Jeff Thies [EMAIL PROTECTED] wrote:
I'm getting this error when I try to retrieve a field that is a text
field (memo, blob, or whatever Access calls
I'm not sure if this is a DBI or an Access question. I think it's
both.
In MySQL I can do this:
my $insert_id = $sth-{mysql_insertid};
and retrieve the primary key from the statement handle. Can I do that in
Access?
Jeff
First time using Access.
I've used my usual insert using placeholders and got an error about a
count mismatch. Does Access not support placeholders?
Anything I should know about Access and DBI?
Also (a little off topic) how do I create an AutoNumber field?
Are there any
Paul Boutros wrote:
First time using Access.
I've used my usual insert using placeholders and got an error about a
count mismatch. Does Access not support placeholders?
It definitely does support place-holders, at least in the versions I've
used. Can you post more info?
I get
I'm getting this error:
DBI fetchall_hashref: invalid number of parameters: handle + 0
Usage: $h-fetchall_hashref() at test_xsl.cgi line 59.
when I try to use fetchall_hashref .
code sample:
$dbh code snipped ...
my $sql=qq{select col1,col2 from some_table};
my $sth=$dbh-prepare($sql);
I would have thought this (limit) would have been part of DBI, is this
a function of the driver?
Yes, it's driver and database specific. It's not ANSI SQL.
Which module would limit be implemented?
In this case, in SQL::Statement, make sure you have version 1.004 of
I'm using a pipe delimited table with Any::Data.
This seems to ignore the limit clause in my SQL:
SELECT field1 FROM some_table limit 0,2
I would have thought this (limit) would have been part of DBI, is this
a function of the driver? Which module would limit be implemented? Or
have I made
I'm having teething trouble on a new webhost.
Using AnyData I'm getting this error:
DBD::AnyData initialisation failed: Can't locate object method driver
via package DBD::AnyData (perhaps you forgot to load
DBD::AnyData?)...
So, I thought I'd try MySQL. This similar message is what I
I'm getting this error (on execute) when I try to use DBI and AnyData
(.5).
DBD::AnyData::st execute failed: Undefined subroutine AnyData::adTable
I've used this on other servers without trouble, what dumb mistake am I
making?
code snip:
use DBI;
my $dbh =
I've been doing this:
my $insert_id = $sth-{insertid}; iwith MySQL to get the last
autoincrement field.
This is now broken, and I'm assuming my webhost upgraded either DBI or
MySQL.
Is there a reliable way to retrieve the insertid ?
Jeff
snip
Question about column names, see below.
I'm manipulating passwords and virtmaps. DBI::AnyData is so much easier
to write/maintain than the glob of Perl this replaces!
Well, subclassing AnyData is alot simpler than you imagine. All you
need to supply is a read_field and write_field and
cc to Jeff Zucker
I'm manipulating passwords and virtmaps. DBI::AnyData is so much easier
to write/maintain than the glob of Perl this replaces!
Great!
The more I use it, the more I like!
snip thanks!
Found one more item that may or may not be a bug.
INSERT only creates fields up to
Anyone have any thoughts on subclassing AnyData for virtmaps?
Virtmaps have two fields delimited by white space.
I would think that for reading (SELECT) them you could pass in:
field_sep,\s on the flags;
And for writing (INSERT):
field_sep,\t on the flags;
I'm completely confused on how you
I've noticed a couple of irregularities.
(recent CPAN installs with Pipe field tables)
1)order by will sort lower case after upper.
b,C,B,A,a,b will order by:
A,B,C,a,b,c
2)no errors returned on update parameter mismatch:
my $sql2='UPDATE some_table SET field1=? WHERE field2=?';
my
After trying for a week to get the DBD::mysql driver loaded in FreeBSD
(couldn't find DBI during install) virtual server I thought I'd try
DBD::AnyData.
Much to my surprise, I could do this:
my $sql='create table table1(field1 varchar(12),field2 varchar(12))';
Are any other data types
Is it possible to print the same kind of messages that you would get
running SQL (MySQL) from the command prompt, with a browser?
Say I want to describe a table:
my $sth=$dbh-('describe some_table');
my $sth_return=$sth-execute($sql) ) or die Cannot execute:
$DBI::errstr\n;
maybe
This is sort of OT and not.
BLOB is binary, don't think you need to specify twice:-) Take off the
binary part.
It doesn't matter on how you go about storing you images, both ways are
fine.
As long as we are sort of on/off topic there is a question about
retrieving images that are
I'm doing something like this (MySQL):
my $sql=q{replace into styles(field1,field2) values(?,?)};
my $sth=$dbh-prepare($sql);
sub enterStyles{
my($val1,$val2)=@_;
$sth-execute($val1,$val2) || die Cannot execute: $DBI::errstr\n;
}
What I've found is that if $val1 is undefined, that the execute
I was reading a post from SQL general about how to code up Perl/DBI
for a simple form. I know that I spend a lot of time doing this, writing
the CGI params and all the placeholders and column binding... keeping
track of the number of question marks...
So I wrote this page and sent it to the
I'm drawing a blank on an error I'm getting inserting a date
(2001070112:00:00) into a varchar field.
Cannot execute: You have an error in your SQL syntax near ':00:00)' at
line 1
my $sql=q{INSERT INTO some_table(the_date) values(?)};
my $sth=$dbh-prepare($sql);
$sth-execute($the_date) || die
I think you con't send Array Object(of course any type of object) thru
Querystring.
rather, before sending you can split the array and delimit by any char like
- and send it.
And at the receiving end you have to append all the data that you split.
Does this mean you can use DBI in an ASP
38 matches
Mail list logo