RE: Selects to MS SQL Server 2000

From: Marcus Willemsen (marcus.willemsen_at_juve.de)
Date: 12/16/03


Date: Tue, 16 Dec 2003 10:22:48 +0100
To: <dbi-users@perl.org>

Thank you Tim,

Okay, I've traced my query and apparently the LongReadLen attribute for
the ODBC driver is set to 0 by default but after changing it everything
works fine.

> -----Original Message-----
> From: Tim Bunce [mailto:Tim.Bunce@pobox.com]
> Sent: Monday, December 15, 2003 6:35 PM
> To: Marcus Willemsen
> Cc: dbi-users@perl.org
> Subject: Re: Selects to MS SQL Server 2000
>
>
> Use trace.
>
> Tim.
>
> On Mon, Dec 15, 2003 at 03:34:46PM +0100, Marcus Willemsen wrote:
> > Hi everybody,
> >
> >
> > I managed to establish a connection with Microsofts SQL Server 2000
> > using DBI without any problems. My only problem is SELECTing
> > textfields from the database. A query like:
> > ---Snippet---
> > my $sth = $dbh->prepare("SELECT [textfield] FROM
> > [database].[dbo].[table] WHERE [id] = 3315");
> > $sth->execute;
> > if(my $r = $sth->fetchrow_hashref){
> > print ("$r->{textfield}");
> > }
> > else {
> > print("No Entry<br>");
> > }
> > ---Snippet---
> > Always results in a "No Entry" despite the fact that there
> is an entry
> > in the table. I get a result using the SQL Query Analyzer.
> So is there
> > anything special about SELECTing textfields?
> >
> > Greetings Marcus
> >
> >
> >
> >
>



Relevant Pages

  • Re: NonStandard Field Names
    ... I don't thinbk I made it clear what was wrong with your query ... > Okay, I got it. ... In the ODBC driver I'm using there is a setting to change ...
    (microsoft.public.fox.vfp.queries-sql)
  • Re: MS SQL Server/ODBC package for Python
    ... Running your benchmark, I ran into a couple of interesting points. ... I changed the query to ... If adodbapi avoids this (which we'll also integrate into mxODBC 2.1), then this would explain the differences you see. ... ODBC driver doesn't provide proper size information - each ...
    (comp.lang.python)
  • Re: ODBC driver manager mangles delimited column names
    ... Thanks Robert, I'm beginning to think you are right. ... I've just finished running some more tests with the trace logging turned on for the ODBC driver manager. ... This is what I get in the log for the automatically generated query: ...
    (microsoft.public.data.odbc)
  • Re: ODBC SQLColums is very slow
    ... explored one such query involving V$ACCESS: ... While expecting the suggestion to collect fixed object statistics to ... might be other hidden problems lurking in the database. ... If the ODBC driver is the ...
    (comp.databases.oracle.server)
  • Re: ODBC SQLColums is very slow
    ... I did not miss the RULE hint. ... explored one such query involving V$ACCESS: ... While expecting the suggestion to collect fixed object statistics to ... I believe that the ODBC driver was the source of the SQL statement ...
    (comp.databases.oracle.server)