View Single Post
  #1 (permalink)  
Old March 18th, 2004, 06:08 AM
sumansaumya sumansaumya is offline
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent:SQL db change dynamicaly for Crystal VC.NET

Hi, I am using crystal 8.0 in VC.NET using the craxdrt.dll.
I want to connect to different database server and difeerent database name at runtime. I have written follwoing code :
IApplicationPtr pApp;
IReportPtr rpt;
rpt = pApp->OpenReport(CString("d:\\report1.rpt").AllocSysStr ing());
pApp->LogOnServer((_bstr_t)"p2ssql.dll", "abum", "northwind", "jhasuman", "sumanjha3");
but it gives error "Server has not yet been opened". Need any help urgently