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

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 ??

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

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

Edited 4 Years Ago by HibaPro

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.

Edited 4 Years Ago by AndreRet

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 :)

This article has been dead for over six months. Start a new discussion instead.