Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 VS2005- Displaying info in a label from a Table

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-10-07 : 11:16:27
Hi,

I know this forum is more SQL related question. But, I have not had any luck and the VBForum. So, I was hoping that some one here can help me with my dilema.


Public Sub Authorization()
Try


Dim cnVelocity As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("VelocityConnectionString").ConnectionString)
cnVelocity.Open()
Dim cmdSP As New SqlCommand("SELECT [Unique_Identifier], [Requestor_Name], [Requestor_Phone],[Requestor_email] FROM [Dr_Authorization_Log_Velocity ] WHERE ([Unique_identifier] = '" & Session("strGUID") & "')")
'Create Data Adapter
Dim dataAdapter As New SqlDataAdapter(cmdSP)
Dim cbTableData = New System.Data.SqlClient.SqlCommandBuilder(dataAdapter)
Dim dt2 As New DataSet
Dim Binding As New Windows.Forms.BindingSource
dataAdapter.Fill(dt2, "Dr_Authorization_Log_Velocity")
'dataAdapter.Fill(dt2, "TableData")
Binding.DataSource = dt2
'fill the label with Requestor_Name from the Table
lblRequestor.DataBind.add("Text", dt2, "Requestor_Name")

cmdSP.ExecuteReader()
cnVelocity.Close()


Catch xcp As Exception
Error_Applist.Visible = True
Error_Applist.Text = "Error on Adding Parameter to the Authorization Table " & xcp.Message
End Try

End Sub

Problem #1 During debugging time the dataset appear to be empty. dt2 container = Nothing.

Problem # The property Binding.Add is unavailable for a label.


I need help, thank you for all your help....

   

- Advertisement -