473,473 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Table Corrupted due to NEW ADODB.RECORDSET

2 New Member
I have encountered a problem when querying a table.
The query passed data into a recordset which should have resulted in many records but has returned EOF.

After debugging the code the only solution i have found is that i have set the recordset to NEW ADODB.RECORDSET two times before actually perfoming the rs.open (once in the main program and once in the dll which contains the loadrecords function).

MAIN PROGRAM

Dim rs as NEW adodb.recordset

qry = "SELECT * FROM tablename WHERE id=x"

IF (NOT dll.loadrecords(rs,qry,cn)) then
goto error_function
endif

DLL

function loadrecords(byref rs as adodb.recordset, _
byval qry as string, _
byval cn as adodb.connection) as boolean

SET rs = NEW ADODB.RECORDSET
rs.ActiveConnection = cn
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseServer
rs.Open qry

loadrecords=true
exit function

after executing this program and even go to the mysql engine (dos prompt) and perform the query (by the primary key) no records are displayed. (querying the table by another field which is not the primary key results in displaying the records i want). this proved to me that something was causing corruption to the table. restarting the mySQL service on the server allows the records to be displayed by the query using the primary key.


i have found that setting the declaration of rs in the main program to:

dim rs as adodb.recordset

has resulted in fixing the problem. because i eliminated the two times of the rs to new adodb.recordset. (?)

i have found a solution to fix this problem but i am not sure why this has only happened recently because it was working fine before for a long period of time. i am not sure whether it is a microsoft update to my computer or the server containing mysql database that has caused it or maybe an mdac issue?

if anyone has experienced this type of problem and knows exactly what is causing it i would greatly appreciate a response.

Peter
Jun 23 '07 #1
0 1526

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: alanrn | last post by:
Is it possible for OCA files to become corrupt? If so, how and what can one do to "repair" them? Or, perhaps, there are other nefarious forces at work here? :-( Here are the particulars of my...
0
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Question how do you test stored...
8
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through...
12
by: jimfortune | last post by:
I have a question based somewhat on: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/ddde992b84f762bd/152bbc027bf00720?hl=en#152bbc027bf00720 A local table works well...
4
by: Steven Smith | last post by:
Hello all, I have a vb6 (not .NET) program using MS Access as the backend. As part of an import form, I need to allow the user to select the table containing the data to be imported. How can I...
3
by: Bhavsan | last post by:
Here is what I am trying to do. Kindly, help me. 1. I'm creating a query dynamically based on User input using VBA (strSQL and DotSQL in the code below) 2. Executing the created query with in VBA...
1
idsanjeev
by: idsanjeev | last post by:
<%@ Language =vbscript%> <% Option Explicit %> <html> <head><TITLE>VOICE OF BARAUNIANS</TITLE></head> <body> <!--#include file="front.inc"--> <div style="Position:Absolute; width:700; TOP:0;...
0
by: timber910 | last post by:
Ok, I have a button on a form that I'm using to create another table I will need later in my form. I have created a reference table called Ref_Table (holds my table names - using this as the tables...
5
by: timber910 | last post by:
I posted this in the VB forum but I think its in the wrong place. So I thought I would try here. _________________________________________ Ok, I have a button on a form that I'm using to create...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.