Please help - overflow error using Access 97 database 
Author Message
 Please help - overflow error using Access 97 database

VB6.0, Visual Studio 6.0, service pack 5.0.
Running on Win2000 pro.
I get an overflow error on the "rstOrders.Open strSQL, cnn" statement.
The same software runs fine on Win98.
Any help greatly appreciated.

== Here is the form load
================================================================
Private Sub Form_Load()
 On Error GoTo Err_Form_Load

'Establish a connection with data source.
    strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\saaborders.mdb"
    Set cnn = New ADODB.Connection
    cnn.Open strConnectionString

'Instantiate a Recordset object.
    Set rstOrders = New ADODB.Recordset

'Open a recordset using the Open method
'and use the connection established by the Connection object.
    Shopper_ID = TxtID
    Shopper_ID = FrmPendingOrders.Text1(FrmPendingOrders.parm)
    'Exit Sub
    strSQL = "SELECT * from CustOrder WHERE shopperid = '" & Shopper_ID &
"'"
    'rstOrders.Open strSQL, cnn, adOpenKeyset, adLockOptimistic, adCmdText
    rstOrders.Open strSQL, cnn

'Cycle through record set and display the results
'and increment record position with MoveNext method.
    x = 1
    Do Until rstOrders.EOF
        odesc = rstOrders("Description")
        For y = Len(odesc) To 1 Step -1
            If Mid$(odesc, y, 1) = " " Then
                Exit For
            Else
                OrdNum = Mid$(odesc, y, 1) & OrdNum
            End If
        Next y
        'Text1(x) = rstOrders("ShopperID")
        Text1(x) = OrdNum
        OrdNum = ""
        Text2(x) = rstOrders("Description")
        Text3(x) = rstOrders("Quantity")
        Text4(x) = "" & Format(rstOrders("unit_Price"), "$#,##0.00")
        rstOrders.MoveNext
        x = x + 1
    Loop

Exit Sub

Err_Form_Load:
    ErrNum = Err.Number
    ErrDesc = Err.Description
    MsgBox "The error " & Err.Number & ": " & Err.Description & " was
generated-Form Load"
    Resume Next
Exit Sub

End Sub



Tue, 30 Dec 2003 23:54:25 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Please help - overflow error using Access 97 database

2. Please help - overflow error using Access 97 database

3. Help please Access 97 database

4. Please help with VB5 application and Access 97 database

5. Fresh Access 97 database !! help please

6. OLE server error on Access 97 - please help

7. Using VBA to Convert Access 2000 database to Access 97

8. Accessing a password protected Access 97 database using the Jet Engine

9. Help, using an Access 97 DB without MS Access Application

10. Help, using an Access 97 DB without MS Access Application

11. Help: convert access 2.0 to access 97 using VB 5.0

12. Help, using an Access 97 DB without MS Access Application

 

 
Powered by phpBB® Forum Software