Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define SQLServer String Connection
Message
 
À
05/06/2003 10:05:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00796685
Message ID:
00796751
Vues:
18
This message has been marked as the solution to the initial question of the thread.
There is a tables collection in the Crystal Report "report" object. Here is an example on you can set the connection information for all tables in a report. I execute this code from my VFP form before showing the report to the user.
cServer = "(local)"		
cDB = ""		&& blank means don't change
cUID = ""		&& blank means don't change
cPWD = "abcdef"		&& must be specified

* Tell Crystal where to find the tables
* indicated in the report. 
local i, xAssignDB
for i=1 to this.oreport.Database.Tables.count

	xAssignDB = this.oreport.Database.Tables.Item(i).SetLogOnInfo( cServer, cDB, cUID, cPWD )

	if isnull( xAssignDB )
		* Don't know what NULL mean
		* but this is what we expect.
	else
		* Did something went wrong?
		assert .F.
	endif

next
>How I can define a string connection in a Crystal Report 9.2 for use with MSDE in Windows 98, then SQL Server security no Windows Security.
>
>I need to define it in runtime.
>
>Regards,
>José Luis.
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform