VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver] 
Author Message
 VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver]

I am using ADO to populate a treeview control from database info.  I am able
to create recordsets that rely on the value of information from another
recordset. Everything works fine, except for the speed issue (7000 items in
the treeview).  To improve performance, I created stored proceedures on the
server to create the recordsets.  The performance improvement is dramatic.
The version that does not use the stored procedure simply closes the
recordset on the inside loop, changes the recordset based on the next
iteration of the outside loop, reopens and adds items to the treeview.  The
program flow is exactly the same when using the stored procedure on the
server to populate the recordset except that the first occurance of a
value(dim 'd as string) that is encountered greater than 7 characters the
following error is displayed:

RunTimeError'-2147217833(80040e57)':[Microsoft][ODBC Sql Server Driver]
String Data Right Truncated

The variable passed to the stored procedure is received in the procedure
listed:
Create Procedure usp_cat
(

)

Since the error is "Sql Server Driver", I suspect there is some
interpretation problem or conversion problem that is corrupting the variable
contents.

What's the fix??

Mike Byerley



Fri, 20 Jul 2001 03:00:00 GMT  
 VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver]
The above problem went away when I changed the vb datatype to fix-length
string (dim'd string * 12), but reappeared in another area when the multiple
variables have to be passed in via Variant array as in:

Create Procedure usp_itembygrpcat
 (


 )
As
select * from invntry

I have trim()'d the fixlength strings before placing them in to the array.
The code seems to go through about 3 to 4 loops where the value of the array
is changed each time before it craps out.

Quote:

>I am using ADO to populate a treeview control from database info.  I am
able
>to create recordsets that rely on the value of information from another
>recordset. Everything works fine, except for the speed issue (7000 items in
>the treeview).  To improve performance, I created stored proceedures on the
>server to create the recordsets.  The performance improvement is dramatic.
>The version that does not use the stored procedure simply closes the
>recordset on the inside loop, changes the recordset based on the next
>iteration of the outside loop, reopens and adds items to the treeview.  The
>program flow is exactly the same when using the stored procedure on the
>server to populate the recordset except that the first occurance of a
>value(dim 'd as string) that is encountered greater than 7 characters the
>following error is displayed:

>RunTimeError'-2147217833(80040e57)':[Microsoft][ODBC Sql Server Driver]
>String Data Right Truncated

>The variable passed to the stored procedure is received in the procedure
>listed:
>Create Procedure usp_cat
>(

>)

>Since the error is "Sql Server Driver", I suspect there is some
>interpretation problem or conversion problem that is corrupting the
variable
>contents.

>What's the fix??

>Mike Byerley



Sat, 21 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO, SQL Server, VB problem posted to the microsoft.public.data.ado group as well

2. S1T00[Microsoft][ODBC SQL SERVER DRIVER] TIMEOUT EXPIRED ?????????

3. Error: 40002 - 01S03: [Microsoft][ODBC SQL Server Driver]No rows updated or deleted

4. S1T00[Microsoft][ODBC SQL SERVER DRIVER] TIMEOUT EXPIRED ????

5. Error : 40002 - 01S03: [Microsoft][ODBC SQL Server Driver]No rows updated or deleted

6. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

7. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

8. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

9. 0 [Microsoft][ODBC SQL Server Driver] Connection is busy with results for another hstmt

10. 01004 - 0 - [Microsoft][ODBC SQL Server Driver]String data, right truncation

11. ? S1000:[Microsoft][ODBC SQL Server Driver]TDS buffer length too large

12. 0 [Microsoft][ODBC SQL Server Driver] Connection is busy with results for another hstmt

 

 
Powered by phpBB® Forum Software