Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 9th, 2006, 05:25 AM
Friend of Wrox
 
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot update record

Hi,
I have a strange problem.
I can add records to my sql db but I cannot update records
and sth more interesting I get no errors.
here is the code in the event handler
I have a form with some textboxes and update button
Sub btn_update(Source as Object,E as Eventargs)

Dim strSQL2 as string
strSql2 = "UPDATE cmm_users set email=@email,Firstname=@Fname where userID=@userID"


     objConnection = New SQLConnection(strConnection)
    cmd = New SQLCommand(strSQL2, objConnection)
    cmd.Parameters.Add(New SQLParameter("@email",user_email.text))
    cmd.Parameters.Add(New SQLParameter("@Fname",firstname.text))
    cmd.Parameters.Add(New SQLParameter("@userID",session("myUserID")))

objConnection.Open()

    cmd.ExecuteNonQuery
    objConnection.close()
end sub

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update one record jemacc SQL Server 2000 0 September 12th, 2007 11:47 AM
not update all record mohiddin52 Access VBA 10 May 9th, 2007 11:41 AM
Update record error Dejitan ASP.NET 1.0 and 1.1 Basics 5 December 20th, 2006 10:15 AM
Update Record Issue phungleon Classic ASP Databases 5 June 10th, 2005 04:26 AM
update record problems whyulil Dreamweaver (all versions) 2 July 24th, 2003 04:38 AM



All times are GMT -4. The time now is 03:38 PM.


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