what is the logonserver and connectionproperties code for vb6 and crystal reports?
Hi. I am trying to open/view the crystal reports version 10 with visual basic 6 and mysql as database. I do not know what is the exact or proper code.
What I have is the following:
crxReport.Database.LogOnServer "crdb_odbc.dll", "localhost", "dbname", "username", "password" but error Logon failed [Microsoft ][ODBC Driver Manager] Data source name not found and no default driver specified.
So I would like to ask what is the right DLL name to use? Or what is the properly syntax for logonserver?
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
We use LogonServer when, at running time, we want to change the data source used at design time
Here's something interesting to you --> http://www.vbmysql.com/articles/vb6-...stal-reports-9
It's for version 9, just change for version 10 where applies, 9 & 10 are almost the same
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
I have also searched googled prior here and the link you provided was one of the googled results however I did not saw how to use or apply the logonserver and that is what I am looking for.
By using logonserver, I am thinking that before I could even open and set data to the rpt, I need to logon to the server first.
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
I need your inputs please. I really hoping someone will help me here.
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
What is the database driver for data access for mysql in crystal reports?
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
I don't think that you follow the link I posted in post #2
There you can find a way to design CR reports and call from VB6 using active data (ttx)
(There're other ways...I use Connection properties instead of LogonServer)
Also you can find some good information that include the MySQL drivers
http://www.vbmysql.com/articles/vb6-...stal-reports-9
http://www.mysql.com/downloads/
http://www.mysql.com/downloads/connector/odbc/
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
jggtz, I am sorry but I really dont find any information there about how to use crxReport.Database.LogOnServer in vb6, crystal report 10, and mysql database.
I am looking for the right pDllName to be used. Searching on google about the database driver for data access, there were no drivers intended for mysql which I am not sure if that is the whole complete list. but ofcourse I have instead already the odbc driver from mysql.
On the list it states:
datasource - ver cr 8.5 - ver 9
=====================
sqlserver - P2ssql.dll - odbc and oledb connection only
odbc - psodbc.dll - crdb_odbc.dll
oledb - p2oledb.dll - crdb_ado.dll
oracle - p2sora7.dll - crdb_oracle.dll
etc...etc..
and there is no stated for mysql which I am confused. In my example provided, it used crdb_odbc.dll
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
The logonserver must be applied to the CR application
in this example it's called crApp, you must change to yours also the database, user id and password
Code:
crApp.LogOnServer "pdsodbc.dll", "MySQL Driver 3.51.dsn", "dbname", "userid","password"
Give it a try
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
logonserver syntax is in this format
crApp.LogOnServer pDllName,pServerName,pDatabaseName,pUserid,pPassword
and your syntax is below
crApp.LogOnServer "pdsodbc.dll", "MySQL Driver 3.51.dsn", "dbname", "userid","password"
my question is why did you use "MySQL Driver 3.51.dsn for pServerName ?
I dont intend to use dns connection. I am using connectionstring for my connection using the ODBC (RDO) so I used "localhost" for my pServerName. Can you please enlighten me?
Anyway, I have tried your code but still data source name not found
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Perhaps you should be asking your question in a section where Crystal reports is the topic as this is really not about VB. The last I used CR was in 1997 and all I remember is that it was a pain to work with and I hated it. Fortunately I found another report engine which works very well with VB and have used that ever since.
Why would you use RDO for a connection to your Local Host???
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Also, Why it must be logonserver ?
I've posted solutions using activedata & odbc and connection properties
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Datamiser, what you said is true that its about crystal reports but this is not totally and purely crystal reports. It is basically the use of vvb code to open the crystal report. But I will heed to your advice. I will provide link there now.
jggtz, actually I can already open the crystal report. However, I am researching in advance how to use logonserver property to know the relevance of it on the connection process with mysql. I dont want to search for the solution on the time i will be having the trouble or something
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
No one actually knows coz no one answers this.
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Keep in mind that Crystal Reports is not part of VB6. I do know a lot of people use it but very few [if any] would be using RDO to talk to a local database. Personally I hate Crystal reports and will not even consider using it in a project so I have no idea what you need to do to get it to work in the way you are trying.
You coudl do what I did, throw away Crystal Reports and buy Active Reports instead. ;)
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Active Reports? Alright, I will take that advice. But I do not have background on that. Maybe you can give me example how to use that with vb6 so I can appreciate it better. Thank you.
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
It actually interfaces into VB6 and it is very much like adding a form to your project, you can write code behind, create dynamic reports, adhoc reports pretty much anything you might need to do and using code just like you would expect in VB. They have several samples included with the software as well as a help file. I do not know if you can still purchase the version that is compatiable with VB6 or not, I've had mine since the 90s
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
What version is compatible with vb6? could you possibly upload that version that you use?
Re: what is the logonserver and connectionproperties code for vb6 and crystal reports
Surely you wouldn't be asking me to pirate software in a public forum?
I do not know what the latest version was that supported VB6. Version 2 or 3 maybe? I think I am using 1.3 or something like that in VB6
No I can not upload it. That would be illegal. You would have to purchase it from the developer or one of thier vendors assuming the VB6 version is still for sale.