Updating a database with vb6

bathroom-blowjob

Open "select reference,value1,datefield from datetable where field1 = 'value1' " & _ "order by reference", obj Audit Con.

Open "SELECT Date FROM TBL_Test Table WHERE Record_URN = '" & test Array(1) & "'", obj System Con. If Not Is Null(rs("value1")) Then test Array = Split(rs("value1"), ",") rs2.

You can instead of doing all this just create a command object Declare these before your loops Rather than doing a 2nd discreet select, pulling the data in, then doing an update and pushing it back out just push out an update statement. Command Text = "UPDATE Date Table SET Date Field = (SELECT Date FROM TBL_Test Table WHERE Record_URN = '" & test Array(1) & "'") obj Comm. You're sending the server a statement to do the updating. However, the original question asked specifically about why the record count keeps incresasing by 1 record every few seconds and then reducing by 1 record immediately. Perhaps the constant updates are causing the index to return some slightly divergent value.

Hi, I have 2 tables in access database.( ex: A, B) In edit mode i am updating Table A with adodc1 and Table B with Adodb Recordset. If I run my program from vb6 it is working fine, but when I execute/run from exe it is not updating my Table B ..

bathroom-blowjob

bathroom-blowjob

Update int Write Count = int Write Count + 1 End If rs2. Active Con, ad Open Static, ad Lock Pessimistic Do While Not rs.Close You're essentially, it looks to me(I haven't used VB6 & ADO in 10 years), loading up your record initial recordset, checking a value, and if that value is not null running a second select THEN updating the recordset.... EOF int Read Count = int Read Count + 1 Do Events If Not Is Null(rs("value1")) Then test Array = Split(rs("value1"), ",") obj Comm. Close your select statement is still there as you can see, it's a sub select now, the advantage being huge, you're not drawing records to the server, then updating them. Jordan, I realise there are better ways of writing the code.

terrem43.ru

69 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>