Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Select Error 01S01

625 views
Skip to first unread message

Jon Wetzel

unread,
Aug 23, 2004, 3:55:38 PM8/23/04
to
The application that I am working on has a window with 2 datawindows
inside of it. They share data with each other. I don't think the
sharing data has anything to do with the problem I am having since I
still get the problem if I try it with just one datawindow.

Before I explain the problem, I am using PB 6.5.1 and SQL Server 2000.

The datawindow with the problem is retrieving from 1 table. The
window changes the SQL of that datawindow by adding a line for LIKE.
The user types in a company to search, and the SQL adds the line
company_name LIKE 'cha%' to the datawindow's SQL.

Now this works 90% of the time, but there are some selections that
return the following error:

Select Error: SQLState=01S01
[Microsoft][ODBC SQL Server Driver]Error in Row

If the user enter "CHA", "CH", "C", "P", or "PR" then the system
returns the error. I found that for those particular searches, the
problem is with "CHAMPAGNE MOVERS" and "PRIME". If the user enters
"CR" or "PL" in the search criteria, everything works fine.

I have searched everywhere for the error 01S01 and I have found brief
descriptions, but nothing explaining what causes it or how to fix it.

What is weird is that this screen worked perfectly 3 weeks ago.
Nothing was changed to any Powerbuilder code or to that particular
table. The data in the rows looks fine (ie, they look just like any
row that does not return an error).

I am posting this in the Powerbuilder forum because I can enter the
SQL with the LIKE statement in Query Analyzer in SQL Server and it
works fine. However, if I put it in a datawindow and hardcode WHERE
company_name LIKE 'cha%", I get an error. So I am assuming the
problem is an ODBC problem between Powerbuilder and SQL Server (it
does say ODBC SQL Server Driver in the messagebox - I'm a genius!). I
even tried the SQL in Access against the SQL Server database and it
worked fine.

Please help. I need to get this working and it is taking more time
that it should.

Jon

Jon Wetzel

unread,
Aug 25, 2004, 10:42:49 AM8/25/04
to
Update:

I changed the DBParm in my database connection in Powerbuilder. Now I
get the following message:

Select Error: SQLState=01004
[Microsoft][ODBC SQL Server Driver]String Data, Right Truncation

I realized that this error only comes up when a certain field has 26
or more characters in it. It is set as a varchar(100) field, so I
don't quite understand why there is a problem when the field has 26 or
more characters in it.

If that field has 25 or less characters in it, then there is no error
given.

I have no clue as to what is going on. Please help (even though I
doubt I made much sense explaining the situation).

jon...@gmail.com (Jon Wetzel) wrote in message news:<35987551.04082...@posting.google.com>...

0 new messages