Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 What component do I need to use MSDataShape?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GoodMorningSky
Junior Member

122 Posts

Posted - 15 April 2004 :  20:45:09  Show Profile
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

Posted - 15 April 2004 :  20:47:55  Show Profile
try this:

http://www.experts-exchange.com/Databases/Q_20745668.html
Go to Top of Page

GoodMorningSky
Junior Member

122 Posts

Posted - 15 April 2004 :  21:13:45  Show Profile
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 April 2004 :  21:17:18  Show Profile
did you try registering the .dll like was mentioned in that article?
Go to Top of Page

GoodMorningSky
Junior Member

122 Posts

Posted - 15 April 2004 :  21:23:47  Show Profile
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 April 2004 :  21:42:42  Show Profile
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.
Go to Top of Page

GoodMorningSky
Junior Member

122 Posts

Posted - 15 April 2004 :  21:51:34  Show Profile
Thank you for response.
I registered the dll, but still doesn't work..

Software Engineer.
MCSD.NET, SCWCD
Go to Top of Page

GoodMorningSky
Junior Member

122 Posts

Posted - 15 April 2004 :  23:18:22  Show Profile
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 April 2004 :  23:31:15  Show Profile
what is the current Service Pack level on the computer that doesn't work?
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 15 April 2004 :  23:57:56  Show Profile
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
Go to Top of Page

GoodMorningSky
Junior Member

122 Posts

Posted - 16 April 2004 :  12:31:18  Show Profile
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07