-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: shri
Message 1 in Discussion

hi,   I want to display the data in crystal report using dataset at run time. I have 
supplied the connection, adapter detail and bounded the dataset having query result 
from two tables (employee and department). When I execute this it asks me connection 
details such as server name, database name, uid, pwd. Even if I give these details 
once for employee and once for department; it throws an exception 'Logon failed'. 
Please check the code below and let me know how to work around using dataset. 
--------------------------------  
Dim con As SqlConnection
Dim ada As SqlDataAdapter
Dim ds As DataSet
Dim rr As cccccccccc 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles MyBase.Load 
Try 
con = New SqlConnection("Server=HJAYIT; uid=sa; pwd=; database=Mas_Test")
ada = New SqlDataAdapter("Select * from employee,department where 
employee.deptno=department.deptno", con) 
ds = New DataSet
rr = New cccccccccc 
ada.Fill(ds, "department")
rr.SetDataSource(ds.Tables("department")) 
CrystalReportViewer1.ReportSource = rr 
Catch ex As Exception 
MsgBox(ex.Message) 
End Try 
End Sub
------------------------------------------ 
Thanks and Regards
Shri

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to