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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum rows for a select statement?!

Status
Not open for further replies.

JoShaw

Programmer
Nov 2, 2001
9
GB
Hi

HELP!!

I have some VB6 code that connects to a SQL server database and loads in data from a textfile. I need to check if a file has already been imported before loading it into the database. I store the filename, and then select from the Header table 'WHERE FileName = fName'. This was all working fine until my table reached 100 rows and now I get the rather unhelpful 'ODBC Call Failed' message.

Is there any way when opening a recordset using DAO, to change the maximum number of rows. I'm assuming this is the problem, because as soon as my table has 100 records in it, the whole thing fails. Any help would be much appreciated.

Thanks

Jo
 
Are you really using DAO(Direct)? [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 

Increase your timeout or use a top # select statement, but if you do use a top select you should order it by the unique id of the table so that if you want to get more records you can use the where clause with a > last unique id.

Good Luck

 
It turned out is was the order I had my SELECT statements in! After a only a FEW hours (!) I worked it out!

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top