Author |
Topic |
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 15 April 2004 : 20:45:09
|
Hi, all. I create a report using VB datareport. but, when I call following statement.. it cause Error "Class not registered!"
cnn.Open "Provider=MSDataShape.1;Persist Security Info=False;User ID=" & gstrID & ";Password= " & gstrPassword & ";Initial Catalog=TimeClock;Data Provider=SQLOLEDB.1" & _ "Data Source=" & gstrLocalDBServer & ";server=" & gstrLocalDBServer
How can I solve this problem? |
Software Engineer. MCSD.NET, SCWCD |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 15 April 2004 : 21:13:45
|
Thank you for quick responsee. however I'm using VB6. not the .net..
Some computer works fine...but not others... I'm getting frustrated..... |
Software Engineer. MCSD.NET, SCWCD |
Edited by - GoodMorningSky on 15 April 2004 21:17:37 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 15 April 2004 : 21:17:18
|
did you try registering the .dll like was mentioned in that article? |
|
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 15 April 2004 : 21:23:47
|
No. I couldn't find it from the article.(http://crlab.com/unidirect/) and I don't want to install .NET Framework.
I installed MDAC 2.6 on the machine where MS sql server 2000 is, still doesn't work.
When I use my app on my computer connecting sql-server on Machine A.. it doesn't work, but if I connecting to sql-server on Machine B.. it works. I think some component is missing on the server side(where MS sql2000 is). I thought it's MDAC.. but it's not.. |
Software Engineer. MCSD.NET, SCWCD |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 15 April 2004 : 21:42:42
|
what I was referring to is this:quote: Try:
Regsvr32 Msdaprst.dll
May need to provide full path to Msdaprst.dll, on my system it is in C:\WINNT\ServicePackFiles\i386
if you can't find that .dll on the computer where it's currently not working, try looking on the one where it is working. |
|
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 15 April 2004 : 21:51:34
|
Thank you for response. I registered the dll, but still doesn't work.. |
Software Engineer. MCSD.NET, SCWCD |
|
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 15 April 2004 : 23:18:22
|
however the computer that doesn't work doesn't have the folder, C:\WINNT\ServicePackFiles\i386. do I need install any service pack? anyway the problem machines have Win 2000 server and Win 2000 pro.. |
Software Engineer. MCSD.NET, SCWCD |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 15 April 2004 : 23:31:15
|
what is the current Service Pack level on the computer that doesn't work? |
|
|
Doug G
Support Moderator
USA
6493 Posts |
Posted - 15 April 2004 : 23:57:56
|
I did a VB6 project with MDAC 2.6 and the DataShape provider and it used a similar connection string, the only difference was that Data Provider was right after the Provider statement, like
cnn.Open "Provider=MSDataShape.1;Data Provider=SQLOLEDB.1" & _ "Data Source=" & gstrLocalDBServer & ";server=" & gstrLocalDBServer Persist Security Info=False;User ID=" & gstrID & ";Password= " & gstrPassword & ";Initial Catalog=TimeClock;
I don't use MSDataShape.1 either, just MSDataShape
This application has been installed on probably every version of windows over the last 3 years with no problems if MDAC 2.6 is installed.
Maybe the error is with some other class? You could try reinstalling MDAC 2.6 on the problem machines.
|
====== Doug G ====== Computer history and help at www.dougscode.com |
|
|
GoodMorningSky
Junior Member
122 Posts |
Posted - 16 April 2004 : 12:31:18
|
Thank you very~~~ much~!! You saved me^^;
I change it as you said, I found the problem. There was ';' missing after Data Provider=SQLOLEDB and I removed .1
cnn.Open "Provider=MSDataShape;Data Provider=SQLOLEDB;Persist Security Info=False;User ID=" & gstrID & ";Password= " & gstrPassword & ";Initial Catalog=TimeClock;" & _
"Data Source=" & gstrLocalDBServer & ";server=" & gstrLocalDBServer
this works fine...
The reason I got stuck was that it works fine on some machine and doesn't work on other machines. That's why I didn't suspect coding problem.
Thank you so much!! now I can deploy. |
Software Engineer. MCSD.NET, SCWCD |
|
|
|
Topic |
|