Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eVB app locking up while opening a recordset

Status
Not open for further replies.

nvshah

Programmer
Nov 9, 2001
12
US
Hello Friends,
I have an eVB app which scans the barcode. While loading the app I initialize the Access database (.CDB) connection and the connection name is

oConnection

After barcodes scans complete I take out the item number from barcode scanned string.

I use that item number to look into Access database using:

Dim oRecordset As Recordset
Dim cSQL as string

Set oRecordset = CreateObject("ADOCE.Recordset.3.0")
cSQL = "Select Item_No, Disc_Ind, Price from Discdata Where
Item_No = " & CStr(Trim(ItemText))

oRecordset.Open cSQL, oConnection

I uses the default cursor type and locking method. I also tried optimistic and dynamic.

It works with any item number except the item number is "2" or starts with "26". If the item number is just "2" or if it starts with "26" (e.g. 2600000, 2631070, 2611070) the application locks up.

With any other item number it retrieves the item price successfully and shows up on the screen.

Any ideas why this is happening ? This is reall weird.

Thanks in advance.

-Nvshah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top