Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Reply to Thread

Post a reply to the thread: asp.net and sql question?

Your Message

Click here to log in

How many letters in the word Rabroad

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 11-25-2010, 05:17 AM
    Nerd

    asp.net and sql question?

    why is this code in the click event not insterting into the database table "shoppingcart" ?


    Dim sqlconn As New Data.SqlClient.SqlConnection()
    Dim sqlcommand As New Data.SqlClient.SqlCommand()

    sqlconn.ConnectionString = "Data Source=infodata.tamu.edu;Initial Catalog=drunyon;User ID=drunyon; password=816003257"
    sqlconn.Open()
    sqlcommand.Connection = sqlconn


    sqlcommand.CommandText = "INSERT INTO shoppingcart([ProductNumber], [Image], [Name], [Description], [Price]) values (45, Images/NewYork, NYG, Hi, 100000)" '& identity

    sqlcommand.ExecuteNonQuery()


    How do I fix it?

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •