msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to pass database login screen

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
Brenny



Joined: 04 Oct 2007
Posts: 1

PostPosted: Mon Oct 17, 2005 11:32 pm    Post subject: How to pass database login screen Reply with quote

Hi
I'm developing a project and in the project, I used crystal report. Firstly
my database isn't protected with password. After finishing project I
determined a password for my database.
Firstly I opened my database as private usage. I determined a database
password. Only password, there iso no login ID or user ID.

After that, I edited my crystal report.In the crystal report I changed only
jet database password. In the report parameter form(windows form) I added
codes shown below ;

crMyReport cr = new crMyReport();


TableLogOnInfo logOnInfo = new TableLogOnInfo ();

CrystalDecisions.Shared.TableLogOnInfo tliCurrent;

int i = 0;


foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in
cr.Database.Tables)

{

tliCurrent = tbCurrent.LogOnInfo;

tliCurrent.ConnectionInfo.UserID =string.Empty;

tliCurrent.ConnectionInfo.Password = string.Empty;

tliCurrent.ConnectionInfo.DatabaseName = "C:\\DB\\SERVER_DB.mdb";

tbCurrent.ApplyLogOnInfo(logOnInfo);

}

cr.SetParameterValue("PARAM1",3);

cr.SetParameterValue("PARAM2",5);

crViewer.ReportSource = cr;

But a form is shown as database login. The form wants to me table name(it is
written automatically,I can't change this value), server, database
name,userID and password.



I tried with some values but I couldn't run my report. I didn't determine
any user ID and password. I'm not sure server and database name values. What
are they? How can I run my report with these parameter?

I'm using ole db 4.0 database.

Thanks.

Archived from group: microsoft>public>vb>ole
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group