SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 7th, 2001, 07:17 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
DB PROBLEM

<i><b>Originally posted by : chris (christohales@aol.com)</b></i><br /><br />Hi<br />If any one wants to help,<br />I really dont know how to get the following code to put values into the database. I know i have to use a record set to SELECT the value from the db, but this is as far as i get with the code and am completely stumped. Can anyone tell me what is wrong with the code and show me, simply, how to correct it<br /><br />Thanks chaps <br /><br /><%<br />varCustID= request.form("txtCustomerEmail")<br /><br />dim oRSs<br />dim oRSi<br />dim strInsert<br />dim strValues<br />dim objConn<br />dim objCmds<br />dim objCmd<br />dim strSelect<br /><br />Set oRSs=Server.CreateObject("ADODB.Recordset")<br />sqltext = "SELECT toolHired1 FROM Tools;"<br /><br />set oRSi=Server.CreateObject("ADODB.recordset")<br />oRSi.open "Reserved", "DSN=Tools"<br /><br />Set objConn = Server.CreateObject("ADODB.Connection")<br />objConn.Open "DSN=Tools"<br /><br />Set objCmds = Server.CreateObject("ADODB.Command")<br />objCmds.CommandText = strSelect<br />Set objCmds.ActiveConnection = objConn<br /><br />Set objCmd = Server.CreateObject("ADODB.Command")<br />objCmd.CommandText = strInsert<br />Set objCmd.ActiveConnection = objConn<br /><br />If Request.Form("Action") = "Add" Then<br /> oRSr.Open sqlText, "DNS=Tools"<br /> If oRSs ("toolHired1") = NULL then<br /> strInsert = "UPDATE Reserved SET toolID = 8, toolHired1 = 'Planer' WHERE customerEmail ='" & varCustID & "';"<br /> objCmd.Execute<br /> End If<br />End If<br /><br />Set objCmd = Nothing<br />Set objConn = Nothing<br />%>

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > DB PROBLEM


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT