Re: Accessing mdb file via VB code
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 5 Jul 2006 17:53:04 -0500
"AK" <nospam@xxxxxxxxxxx> wrote in message
news:%23t6Y07GoGHA.4736@xxxxxxxxxxxxxxxxxxxxxxx
Hello Allas
None of the previous installs re-registers etc worked but I got it fixed
indicated below by doing what BobOBob calls banging uranium together..cloud
Go Figure!
If any of you know why my string would not work, please reply. I want to
learn.
*************
Solution -
*************
I goggled around and came across a reply by Veign at:
http://www.codecomments.com/archive344-2005-10-672548.html
Where he says :
<SNIP>
You need a connection string like:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:Database Password=MyDbPassword"
<SNIP>
OK I bit at the bait - rather I grabbed at the straw out of desperation.
My connection string was:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data " & _
"Source=" & m_sDataFile & ";" & _ 'm_sDatafile is my
path to my Database
"Jet OLEDB:Database Password = MyPassword; &
Mode=ReadWrite;"
Note how my connection string had a Mode=ReadWrite at the end.
I removed this and everything worked. (till it blows up in a mushroom
at least)helps
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data " & _
"Source=" & m_sDataFile & ";" & _ 'm_sDatafile is my
path to my Database
"Jet OLEDB:Database Password = MyPassword"
I hope this solution provides insight to the nature of the problem and
any others out there comment on why the Mode parameter killed things.it
Although I did not write the previous code, I looked at the ado books and
appeared to me that the only thing that the Mode parameter was doing wasif
telling the connection what the premissions were that the data consumer
could have. Apparently there is more to it. Hummm maybe the mode is only
the premissions are at a level less than ReadWrite?11.0.6550
Ralph, lets post this "Solution" to our memory banks as I bet we see this
problem again.
AK
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:3r6dnW6HVrK0sDbZnZ2dnUVZ_sCdnZ2d@xxxxxxxxxxxxxxx
"AK" <nospam@xxxxxxxxxxx> wrote in message
news:OzsFjZ5nGHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
My Reply In line
I am using MS VB 6.0 SP6 the about says it is Ver9782, Forms3:
actionWin XP SP2"DAO"
Access being used "out of the box". My application works fine when
running
without a password.
<Snip>
If you are using ADO and ADO providers are you by any chance using a
control (DataGrid) on this second form?
How did you know? Yes I am.
Works for the form that had a flexgrid. It is when I click to the form
having the datagrid when I get the error.
Ok, then Personally I would blow off all DAO controls. You don't need
them,
unless you are using DAO, and it sounds like this is the problem.
but
If so you will need to make sure the DAO components and typelib are
installed and registered. You should find them in Progr~Files\Common
Files\Microsoft Shared\DAO. This is the simple fix.
OK, I reregistered the dlls, Dao350.dll and Dao360.dll with regsvr32
In the folder there is also type lib in there named DAO2535.TLB
Am I supposed to do somthing with this file. I tried the regsvr32 on it
that says it is not an exe or dll. Am I supposed to do some other
http://www.vbaccelerator.com/home/VB/Utilities/Type_Library_Registration_Utility/article.aspon
it??
To register typelibs checkout this utility...
onThere are others, but this at least explains what's going on.
The DAO2535.tlb is used for development - ignore it in this situation.
[Occasionally these files are not correctly installed or registered
usingWinXP
boxes with Jet4. Also be aware - the problem is not that you are
theor
"resolution"accessing DAO from your program, the problem is that these controls
need
the
DAO to be properly installed. Therefore this has nothing to do with
project
references.]
If that doesn't solve the problem then try this...
http://support.microsoft.com/default.aspx?scid=kb;en-us;299457
Make sure you have only one MSVBVM60.dll on your machine.
I did a scan and I only have one MSVBVM60.dll on my machine.
I looked over the KB article you mentioned above and under the
section is says:the
*********
"To resolve this problem, make sure that the version of MSVBVM60.dll is
same version that is distributed with Visual Basic 6.0 SP4 (which is
6.00.8877 for SP4 and 6.00.8964 for SP5). MSVBVM60.dll is located in
need\WINNT\System32 or \Windows\System folder.""
************
OK Mr Gates, are you sure that you are really telling me here that I
versionto
roll my MSVBVM60.dll which was installed with VB6 SP6 and is versionexaclty
6.0.97.82 BACK to a version from an earlier service pack, i.e to dll
version 6.00.8877??? (I mean I am reading the language as telling me
that but...... Additionally, if so, where do I get the dll that is
distrubuted with VB6 SP 4?
Ralph is this correct? Am I really supposed to get an earlier SP4
Soundsof
the dll and register it, even though I have VB6 w/ SP6 installed?
mindodd
to me. If this is what I need though, do you know where to get the
earlier
version from a "clean" site?
That does appear to be the 'cure' in many cases. but I never get the
followup, thus I have no knowledge of long-range consequences. To my
oneit
seems like there would have to be.
Since running into this problem several times myself, and doing a bit of
research (googling, inventoring components, ...) I don't have an answer.
MS
remains mute (or at least I can't find the blog). Also what works for
Othersoften doesn't work for another.
Some people report it as happening to an entire new suite of boxes.
noreport scattered behavior. In cases where I have been called in, it has
been
the latter. Each incident though isolated appeared on boxes that showed
MSVBVM60.dllobvious difference between its inventory and configuration than its
brethren.
I am only rattling on in hopes someone else out there that KNOWS, will
jump
in.
So the only 'cure' I know of is to install an old version of
aor
completely re-install everything. I usually do the latter, because while
lengthy PITA - it will at least eventually provide a solution. I have
wasted
days popping components in and out and still didn't get it to work. <g>
-ralph
another
Thanks
AK
If that doesn't seem to resolve the problem, then it is caused by
withmiss-match of components. If you are still having trouble report back
all the specifics of your problem domain. (Data Access Libraries, OS
version, Jet, MDAC, etc.) You can fiddle away one by one, or simply
burn
everything MDAC/Jet down to the water line and start over.
hth
-ralph
My "memory banks" are incredibly faulting and are not to be trusted. I have
been bitten by an odd connection string causing odd problems so often it
isn't funny, yet since you said one Form worked and another didn't - I
assumed the connection was OK.
[Note that word - "assumed".]
Glad it is working.
-ralph
.
- Follow-Ups:
- Re: Accessing mdb file via VB code
- From: AK
- Re: Accessing mdb file via VB code
- References:
- Accessing mdb file via VB code
- From: AK
- Re: Accessing mdb file via VB code
- From: Jeff Johnson
- Re: Accessing mdb file via VB code
- From: Ralph
- Re: Accessing mdb file via VB code
- From: AK
- Re: Accessing mdb file via VB code
- From: Ralph
- Re: Accessing mdb file via VB code
- From: AK
- Re: Accessing mdb file via VB code
- From: Ralph
- Re: Accessing mdb file via VB code
- From: AK
- Accessing mdb file via VB code
- Prev by Date: Re: Issues running a program from the shell?
- Next by Date: Re: User-Define Type: object needed error??
- Previous by thread: Re: Accessing mdb file via VB code
- Next by thread: Re: Accessing mdb file via VB code
- Index(es):
Relevant Pages
|