Re: SQL Server and 'set dateformat'

2005-07-07 Thread JupiterHost.Net
Ron Savage wrote: On Thu, 07 Jul 2005 11:38:06 +1000, Daniel Kasak wrote: Hi Daniel my $sth = $dbh-prepate( set dateformat dmy ); What am I doing wrong? probably prepate is not a function, I think you mean prepare Does that exact query work via CLI interface (IE is the query bad)

SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
Hi all. The SQL Server docs say that you can instruct SQL Server to interpret dates in the format you want ( for example in insert statements ) by issuing the command: set dateformat xxx where xxx is the format string, for example dmy So I'm doing: my $sth = $dbh-prepate( set dateformat dmy

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Ron Savage
On Thu, 07 Jul 2005 11:38:06 +1000, Daniel Kasak wrote: Hi Daniel my $sth = $dbh-prepate( set dateformat dmy ); What am I doing wrong? No idea, but I'd try: set dataformat 'dmy' -- Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
Ron Savage wrote: On Thu, 07 Jul 2005 11:38:06 +1000, Daniel Kasak wrote: Hi Daniel my $sth = $dbh-prepate( set dateformat dmy ); What am I doing wrong? No idea, but I'd try: set dataformat 'dmy' Yeah I've tried that. No difference. SQL Server is strange in that many of these

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Jeff Seger
try: my $sth = $dbh-prepare( set dateformat dmy )|| die $dbh-errstr; #to see if it's puking on prepare or $dbh-do( set dateformat dmy ) || die $dbh-errstr; # this is the format I've learned to use for setting # session params. Daniel Kasak wrote: Hi all. The SQL Server docs say that

Re: SQL Server and 'set dateformat'

2005-07-06 Thread Daniel Kasak
Jeff Seger wrote: try: my $sth = $dbh-prepare( set dateformat dmy )|| die $dbh-errstr; #to see if it's puking on prepare or $dbh-do( set dateformat dmy ) || die $dbh-errstr; Interesting. The above ... $dbh-do( set dateformat dmy ) || die $dbh-errstr; ... actually does the trick, but it