VB6 & Access 200 DB - works great on most Win2k boxes, but not on 2 ----- HELP!!

This is a second post from the VB DB topic area - but due to lack of response I am posting it here as well.


Ok, i have this VB6 app that talks to an Access 2000 DB.  The users login to the app, then a basic set of data is pulled from the DB based on their login.  On my PC, I can login, and see the basic data.  On the problem PCs (there are 2 of them) I can login, but the basic data is not pulled from the DB.  Now, I know they are talking to the DB correctly since it logs them in and asks them a question based on their login.  Also, the DB is not corrupt as I have taken the working DB on my PC and trandfered it to their PCs and still no joy.  

Here is a desc. of my machine and the problem PCs:

WORKING           - Win2k SP4 - MDAC 2.8 from 2.6, Access 2000 (v 9.0.2720) -- this is my PC
                         - Win XP SP1 - MDAC 2.7 SP1, Access 2002 (v. ??) --- another users PC

NOT WORKING (others) -  (1) Win2k SP4 (French Version) - MDAC 2.8 from 2.6, Access 2000 (v. 9.0.2812)
                                  -   (1) Win2k SP4 (French Version) - MDAC 2.8 from 2.5, Access 2000 (v9.xxx SR-1) - I don't remember the exact version number except that it was SR-1

I should mention that these are traveling users so I do not have access to the PCs.  I will be getting them Friday evening - gotta love working late on Fridays... ;-)

Am I leaving any info out that you need?  Any help would be appreciated!  TIA for the help!

-Craig


**Note:  It was suggested that I deploy my app via the Package and Installation wizard - but I am already doing it that way.  
cas27Asked:
Who is Participating?
 
David LeeConnect With a Mentor Commented:
If you haven't already done so, check this article out.  It mentions a problem with numeric key values.  Pay special attention to the notes at the end of the article.  It makes a mention of the "language selected in Regional Settings".  Since the problem is occuring on machines that use French this seems like a likely candidate.

http://support.microsoft.com/default.aspx?kbid=204054
0
 
vinnyd79Commented:
Did you set the cursorlocation on your connection to adUseClient?
0
 
Mikal613Commented:
Post the code
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
cas27Author Commented:
Here is a code snippet from my main module


Public DBConnection As New ADODB.Connection
------------------------------------------------------
AccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
                  "Dbq=func_db.mdb;" & _
                  "DefaultDir=" & App.path & ";" & _
                  "Uid=Admin;Pwd=;"
DBConnection.Open AccessConnect

------------------------------

Then in a seperate from:

Set FunctionRS = DBConnection.Execute( _
    "Select min(function_id)AS MIN_ID from function where project_id= " & appProjectID)

Apparently something goes wrong with this statment, but I haven't had the time to debug this extensively.  I will be headed into a 4-5 hour meeting in just a bit, so don't be surprised if I don't respond before 1pm PST.

Thanks!

Craig
0
 
WintersVineCommented:
it needs to read: (note the ' on either side of your variable appProjectID)

Set FunctionRS = DBConnection.Execute( _
    "Select min(function_id)AS MIN_ID from function where project_id= '" & appProjectID & "'")
0
 
SethiCommented:
The As clause in this statement needs a space in between:

Set FunctionRS = DBConnection.Execute( _
    "Select min(function_id) AS MIN_ID from function where project_id= " & appProjectID & "")

There is no need for single quotes if project_id is numeric.
0
 
David LeeCommented:
Since the application works okay on some PCs and not on others it seems unlikely that it's a problem with the code.  I'd expect the problem has something to do with the environment on the PCs where the app doesn't run properly.  Craig, I'm guessing that the app just fails to pull the data and that there are no error messages presented.  Is that correct?  Any chance the behavior you're seeing could be a permissions issue?  Do the users of the non-working PCs have sufficient rights to the database and the folder it's located in?  Who was logged in at the PC when testing the app on the problem PCs, you or the user?  I seem to remember reading somewhere that it's best if the same version of MDAC used on the development PC is installed on the client PCs.  Would it be possible to upgrade the version of MDAC on all the PCs?
0
 
cas27Author Commented:
BlueDevilFan,

I am in agreement with you.  THe code should be ok as it works on every PC I have tried  except for the two running the French localized version of Windows.

The MDAC is now the same on all of the PCs (2.8).  I have yet to give them the updated/compiled version off my PC, with MDAC 2.8.  The users were logged in as themselves - I had not thought of file permissions I will check that out.  


Sethi,

appProjectID is numeric, so you are right, I don't need the quotes.  Also, there is a space in the actual code - I must've forgotten to hit the space bar when I was cleaning it up to post.


Thanks all.  I'll let you know more after I try logging on as myself / check file permissions.

-Craig
0
 
cas27Author Commented:
BlueDevilFan,

I do receive an error message, but it is is the error I get when the DB is supposed to be corrupt.  I know the DB is fine I have copied a good version onto the machine (and checked the file properties to make sure it was the exact same size, etc.).   As a further test, I then copied it back to another PC and tried the app with the new (copied) DB.  It ran perfectly.  This is the reason why I am so stumped on this.

Thanks again for the ideas.  More later.

-Craig
0
 
David LeeCommented:
What's the error message?  Many Microsoft error messages are somewhat generic and have multiple possible causes.  If we knew what the error message is that might help isolate the cause.
0
 
cas27Author Commented:
Ok...  Debugging remotely... sorry for taking so long between posts...

Error info:
err.Source: Nodes
err.Descrip: Invalid Key
err.Number: 35603

Any ideas?

Thanks!

-Craig
0
 
cas27Author Commented:
I should mention that the error occurs when I try to add a node to the tree control.

So, on when it hits this line

'lets add the root node first:   root = string var = "f2" |   strTitle = "Function XXXX"
tree.Nodes.Add , ,root, strTitle

it sends me to my error handler.

I have also tried it the   set nodeX = tree.nodes.add    way, but that fails too.  I cannot even add a node "manually" by hard coding the values above into the statement.

Thanks!

-Craig
0
 
cas27Author Commented:
BlueDevilFan,

Thanks!  That articel helped me with the problem.  As soon as I changed my key from AX to AAX, where A is a letter and X is number, it worked great!  Now I just need to tweak the rest of the app.

Thanks to everyone else who weighed in on the topic - its appreciated.

-Craig
0
 
David LeeCommented:
Cool.  Glad I could help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.