Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2006, 08:42 AM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anbane80
Default Error in Drop Down List

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;Integ rated 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
 
Old December 12th, 2006, 09:08 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
 
Old December 13th, 2006, 12:59 AM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anbane80
Default

Hi Mike,

I was included that cn(Connection) also but still i am getting same error. pls help me out.

Regards,
Ananth.B

 
Old December 13th, 2006, 03:21 AM
Registered User
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anbane80
Default

Thanks a lot Mike. Its working fine.

Regards,
Ananth.B






Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down list ashu_gupta75 Excel VBA 1 October 15th, 2007 05:52 PM
Drop down list carumuga Classic ASP Basics 1 February 6th, 2007 02:37 PM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 6 March 18th, 2005 03:32 AM
Drop Down List Beginner123 VB How-To 2 March 7th, 2005 01:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.