Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SQL error?

Reply
Thread Tools

SQL error?

 
 
Jerome
Guest
Posts: n/a
 
      04-27-2004
Hi,

I've got the following code but my records don't get updated ... Is
anyone seeing why? Just looking at the code? Any help is appreciated!

Jerome

<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim strSQL 'Holds the SQL query to query the database

Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DSN=IntranetDB"

NewsInt=request.querystring("textfield")

strSQL="UPDATE activites_edu_bkp SET "
strSQL= strSQL & "testfeld='yes'"
strSQL= strSQL & " WHERE news='" & NewsInt & "'"
on error resume next
adoCon.Execute sql
if err<>0 then
response.write( "*" & NewsInt & "No update permissions!")
else
response.write("Records for " & NewsInt & " updated!")
end if
adoCon.close
%>
 
Reply With Quote
 
 
 
 
Jerome
Guest
Posts: n/a
 
      04-27-2004
Please ignore my question, found the error!

Jerome wrote:

> Hi,
>
> I've got the following code but my records don't get updated ... Is
> anyone seeing why? Just looking at the code? Any help is appreciated!
>
> Jerome
>
> <%
> 'Dimension variables
> Dim adoCon 'Holds the Database Connection Object
> Dim strSQL 'Holds the SQL query to query the database
>
> Set adoCon = Server.CreateObject("ADODB.Connection")
> adoCon.Open "DSN=IntranetDB"
>
> NewsInt=request.querystring("textfield")
>
> strSQL="UPDATE activites_edu_bkp SET "
> strSQL= strSQL & "testfeld='yes'"
> strSQL= strSQL & " WHERE news='" & NewsInt & "'"
> on error resume next
> adoCon.Execute sql
> if err<>0 then
> response.write( "*" & NewsInt & "No update permissions!")
> else
> response.write("Records for " & NewsInt & " updated!")
> end if
> adoCon.close
> %>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
Do the Self-Paced Training Kits: Microsoft SQL Server 2000 include Eval copy of SQL Server? Brian Whiting Microsoft Certification 2 12-29-2005 04:24 AM
DBI SQL column datatype not jiving with SQL statement requirement dna Perl 1 01-18-2004 04:15 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page David Browne ASP .Net 0 08-21-2003 10:43 PM
Re: SQL statement working in SQL Server but not in .aspx.cs page William \(Bill\) Vaughn ASP .Net 0 08-21-2003 10:41 PM



Advertisments