Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Failure, ASP.Net

Status
Not open for further replies.

MissLissa

Programmer
Joined
May 13, 2004
Messages
1
Location
US
I'm trying to use the Push method for passing the dataset from a SQL Server stored procedure to Crystal Reports via the aspx. I've tried a dozen different code examples and I keep getting the same dreaded "logon failed" error. Below is the latest code I've tried. Any help would be much appreciated.

Sub BindReporttoDS()
Dim myconnection As New SqlClient.SqlConnection

myconnection.ConnectionString = "myconnstr"
Dim mycmd As New SqlClient.SqlCommand
mycmd.Connection = myconnection
mycmd.CommandType = CommandType.StoredProcedure
mycmd.CommandText = "mysp"


Dim myda As New SqlClient.SqlDataAdapter
myda.SelectCommand = mycmd
Dim myDs As New DataSet
myda.Fill(myDs, "mysp")

Dim oRpt As New CrystalReport1
oRpt.Load()
oRpt.SetDataSource(myDs)
CrystalReportViewer1.ReportSource = oRpt
myconnection.Close()

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top