I am using Win 2k,
VB 6.0 with service pack 5, DB2 V7.1
I have the following program
---------------------------------------------------
Dim conInsert As ADODB.Connection
Dim cmdChange As ADODB.Command
Set conInsert = New ADODB.Connection
conInsert.Mode = adModeReadWrite
conInsert.Open "a vilid connect string"
Set cmdChange = New ADODB.Command
Set cmdChange.ActiveConnection = conInsert
cmdChange.CommandType = adCmdText
cmdChange.CommandText = "INSERT INTO STD_NEW_RECORD (
STD_ID, STD_NAME, STD_CLASS.....
SELECT
STD_ID, OLD_STD_NAME..
FROM OLD_STD_RECORD WHERE
STD_ID like '000%'" <= problem is here
cmdChange.Execute
-------------------------------------------------
The above statements insert the old student record table into a new student record table. STD_ID is char(12) and the primary key of both table
I use the "STD_ID like '000%'" to limit the number of record insert into the new student table. By change the condition, i can roughly limit the number of record insert into the new student table
When the the number of record is about 8000, the program run correctly, but when I delete condition "STD_ID like '000%'", about 100000 record will insert into the new student record table, the
VB program crash.
the message just said some memory location is not allow to read.
Would anyone help me solve this problem?
THANKS