PC Review


Reply
Thread Tools Rate Thread

Database Update Query

 
 
Mettá
Guest
Posts: n/a
 
      7th Dec 2005
Can someone tell me what's wrong with the following...

<%
myConnString = Application("DBNAME_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
mySQL= "Update Table1 Set
spname='::spname::',ton='::ton::',mess1='::mess1::',valsent='::valsent::'
WHERE ID1='::ID1::' "
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
%>


It's in a FP2003 site, was working in a DRW but now fails so I thought I
would create a manual update but am not getting very far
Thanks
M
--
---


 
Reply With Quote
 
 
 
 
Ronx
Guest
Posts: n/a
 
      7th Dec 2005
Is ID1 a numeric field?
If so, then

mySQL= "Update Table1 Set
spname='" & request("spname") & "',ton='" & request("ton") &
"',mess1='" & request("mess1") & "',valsent='" & request("valsent") &
"'
WHERE ID1=" & request("ID1")
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


"Mettá" <(E-Mail Removed)> wrote in message
news:urJgbrx#(E-Mail Removed)...
> Can someone tell me what's wrong with the following...
>
> <%
> myConnString = Application("DBNAME_ConnectionString")
> Set myConnection = Server.CreateObject("ADODB.Connection")
> myConnection.Open myConnString
> mySQL= "Update Table1 Set
>

spname='::spname::',ton='::ton::',mess1='::mess1::',valsent='::valsent
::'
> WHERE ID1='::ID1::' "
> myConnection.Execute mySQL
> myConnection.Close
> Set myConnection = Nothing
> %>
>
>
> It's in a FP2003 site, was working in a DRW but now fails so I

thought I
> would create a manual update but am not getting very far
> Thanks
> M
> --
> ---
>
>



 
Reply With Quote
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update database from ODBC query (or another method) Richard Edwards Microsoft Excel Worksheet Functions 4 24th Jun 2008 11:47 AM
Update database from ODBC query Richard Edwards Microsoft Excel Misc 0 24th Jun 2008 09:22 AM
Problem with Update Query - will not update database Elmo Watson Microsoft Access 8 8th Mar 2006 03:06 AM
Update query based on another database =?Utf-8?B?VGVld2Fu?= Microsoft Access VBA Modules 1 12th Dec 2005 01:30 PM
Query Database Return and Update SmokinJoe Microsoft Access Queries 1 13th Jan 2004 06:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:02 PM.