|
Subject:
|
Error in Drop Down List
|
|
Posted By:
|
anbane80
|
Post Date:
|
12/12/2006 7:42:51 AM
|
Below is the code i wrote, you'll find where the error is at below "bold & red" the error states... "property access must assign to the property or use its value."
what does that mean????
Dim cn As New SqlConnection Dim cmd As New SqlCommand Dim dad As New SqlDataAdapter Dim dset As New DataSet Try cn = New SqlConnection("Server=localhost;database=CMS;Integrated Security=SSPI") cmd = New SqlCommand("PRO_VEND_TRANSACTION_DDL") If cn.State = ConnectionState.Closed Then cn.Open() End If cmd.Parameters.Clear() cmd.CommandText = "PRO_VEND_TRANSACTION_DDL" cmd.CommandType = CommandType.StoredProcedure dad.SelectCommand = cmd dad.Fill(dset, "Accenture") ddlvendname.DataSource = dset.Tables("Accenture") ddlvendname.DataBind()
Catch ex As Exception
End Try
End Sub
|
|
Reply By:
|
mike_remember
|
Reply Date:
|
12/12/2006 8:08:15 AM
|
With the SqlCommand, pass your connectionstring cn too like
cmd = New SqlCommand("PRO_VEND_TRANSACTION_DDL",cn)
and then try.
Regards Mike
Fortune favours the brave, so don't regret on missed oppurtunities.
|
|
Reply By:
|
anbane80
|
Reply Date:
|
12/12/2006 11:59:39 PM
|
Hi Mike,
I was included that cn(Connection) also but still i am getting same error. pls help me out.
Regards, Ananth.B
|
|
Reply By:
|
anbane80
|
Reply Date:
|
12/13/2006 2:21:05 AM
|
Thanks a lot Mike. Its working fine.
Regards, Ananth.B
|