hi.,
this is the way i open a recordset...my problem is if insert a new record to the CUSTOMER Table, it took a while before the recordset was updated even i run the adoParentRS.requery ... so, i created a function to delay the code for about 2 seconds then i'll run the .requery and it's only the time that the recordset will be updated.VB Code:
' declarations dim db as adodb.connection dim adoParentRS as adodb.recordset 'on form load set db = new adodb.connection db.cursorlocation = aduseserver db.open gstrConnectString set adoparentrs = new adodb.recordset adoparentrs.cursortype = adoopenstatic adoparentrs.locktype = adoLockReadOnly adoParentRS.Open "Select * from Customer", db, adoOpenStatic, adLockReadOnly ' on my command button i usually run this statement ' gsdq is a variable of double quote (") dim sCmd as string scmd = "Insert into Customer (CustomerCode, CustomerName) values (" scmd = scmd & gsdq & txtfield(0).text & gsdq & ", " scmd = scmd & gsdq & txtfield(1).text & gsq & ") " db.execute scmd
thanks in advance for your help.
alexis




Reply With Quote