hey everybody , i need the help plzz,,,

i have an application that developed using vb6 and i have its database that design by sql server , but i dont know how to make it run , when i run the application its give me the following error :
Dim rs as new Recordset
Compiler error : user defined type not defined.

amd when i load the application again its gives me crviewer.dll could not be loaded , any suggestion can help me plz ??????

The crviewer.dll error is because you do not have crystal reports (or the incorrect version!!) installed on your pc. You need to have the version that is referenced in your application installed for it to run properly.

Your first error - "not defined" is because you have not declared a new recordset, whilst you are calling it. Make sure that you have referenced MS ActiveX Data Object 2.x Library. In your code rather try the following -

Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

Is the crystal reports install as any program or come build with vb 6 ???

It is not build into vb6, it is a third party reporting tool which you need to purchase. If you do purchase, keep in mind that from version 11 onwards does not work in vb6, only in .net

i see, ty and i will purchase ...

It's a pleasure. Please mark this as solved thank you. :)

After i install the crystal report 10 , these error appear :
- invalid out side procedure when i write the two statements:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

  • Error during load refer to and give me the name of from.log

how i can fix and please tell me how i can change the connection with sql server ??
ty

Did you reference MS ActiveX Data Objects 2.x in your application?

actually i dont know , how i can know if yes or no and if no , how i can do that ,
Thx in advance

You need to include that from Project--> References menu

sry but now i have this error Dim Report As New rReportbydate , compile error - user defined type not defined, help plz , and please can you give me how to edit the connection string ?? the syntax of it

It seems that you have copied someone elses code and are not sure what it does. This means we are going to run through almost every line with errors before it will be running properly...

If you look at how we solved the first part with the error on dim..... you now have the exact same problem. You are setting a reference to an object that does not exist, it needs to be declared first.

we have to solve the 1st problem before we go to the second one.... ^_^

my problem seem in reference i dont know what reference to add , actully i run the project after your hlelp and i edit the connection string , but now i need to know which refernce should add to the following errer : Dim mStream As New ADODB.stream compile error - user defined type not defined , i am not copy the project , really my maneger give this project and told me to run it :)

anyone can help please :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.