Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Error 7005: Rowset not available

Posted on 2002-05-31
4
2,507 Views
Last Modified: 2008-02-26
I developed a program in Visual Basic 6.0 on my desktop (W98)and now have problems running it on my laptop (W2k). The following error is displayed: 7005 - Rowset not available – and the database name is the caption. I hope someone can tell me what I do wrong.

On the desktop I have Visual Basic and Access installed. On the laptop only Access. They are both hooked onto the local network, so I copied the directory with all the files from the desktop to the laptop. Everything works on the desktop without any problem. I can run the executable file on my laptop and the program starts okay. I can go to screens without any database connection without any problem.  But with screens that references the Access database I do have problems.

I had created a table maintance form using the wizard. When loading the screen it is not loading any records in the ADODC. The datagrid stays empty too. When I choose the ‘Refresh’ button, the ADODC indicates the first record, the datagrid stays empty. I can select the ‘last record’ button it shows how much records are in the file, but still no data is shown in the datagrid.

On the form with ADODC that I created from scratch, the datagrid doesn’t load any records either. When I load that screen the message: 7005 - Rowset not available – appears with the database name as caption. That datagrid also doesn’t show any records.

All forms have the connection string build on the ADODC. I have tried to define those in the routines without any success. Therefore, I make sure the directories are the same on both desktop and laptop. The access database has no password. The dabase tables are okay when I open them using Access. They contain all the records. I tried with and without “.Cursorlocation” in the load routinte and in both cases I got the error.

The problem must be with the access database. I just don't know what. The procedure I use for loading:

Private Sub Form_Load()

strSQL = "SELECT * from Industry ORDER BY rank, industry"
strPath = App.Path & "\Stocks.mdb"

'-Build our connection string to use when we open the connection --
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & strPath

With DBInd1
        ' initialize our connection to the database
        .CursorLocation = adUseClient
        .ConnectionString = connectString
        .CommandType = adCmdText
        ' set up the first query
        .RecordSource = strSQL
        ' refresh the data source to make sure the query goes through.
        .Refresh
End With

Me.MousePointer = vbDefault

End Sub

I hope someone can make my day and tell me how I can fix this.
Marcel
0
Comment
Question by:mcpdallas
  • 2
4 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7046817
But you haven't installed the application onto your laptop so you cannot be certain that all components have been properly installed and registered. Just because it seems to work does not mean that it is working properly. You MUST create an installation package if you expect an application to work properly on another machine. The most likely candidate is either the datagrid control or the ado data control that you are using.

My advice would be to use the p&d wizard to create a setup package for your application, install that on the laptop and then see what if anything doesn't work. I think you may find that everything then performs as expected.
0
 

Expert Comment

by:nickbeau
ID: 7046906
I would agree with Tim. Just installing portions of an application on your laptop may seem successful but truly is not.

Remember, Windows 2000 comes with many of the Visual Basic 6 distributable files (or their more recent versions) as standard.

Either:

A) Create a Setup Package using the P& D Wizard as TimCottee suggests or

b) Use Depends.exe from visual studio to find all application dependencies and ensure you have the correct versions.

See DLLHell on MSDN or Technet for More detailed information (That is the issue you have)

0
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 7046920
You would agree with me, so why lock the question with a proposed answer?

I can see that today is your first day here nickbeau so please take this the way it is intended (as friendly advice).

The "answer" button places a question in the locked section which tends to get less traffic as it has been locked with a proposed answer, use of this option is extremely deprecated and we are campaigning vigourously to get it removed or changed to prevent occurrences such as this.

Please read the guidelines on comments vs answers at the bottom of this page or at http://www.experts-exchange.com/visualbasic/Q_20306564.html#tip and you will understand why this should have been posted as a comment.

If you continue to post answers when comments would have been more appropriate your account will be referred to customer services by an annoyed "expert" and you may well be suspended or have your account terminated. Whilst I sincerely hope that this does not occur as I am sure that you have a contribution to make here the use of the answer button on a regular basis will cause annoyance.
0
 

Author Comment

by:mcpdallas
ID: 7047945
The initial answer by TimCottee was the correct one. I used the P&D wizard, copied the files to the laptop and ran Setup.exe. The program is now showing the table entries correctly.

At the moment I can only accept Nickbeau's answer, while TimCottee should have the points. Therefore, I reject this answer, so TimCottee can give a new answer and get the points

Marcel
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
Excel - Save a copy of work book 13 88
Access Object Property from VBA Module in Excel 2010 2 37
how to Classify of email (pdf attachments) 7 45
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question