Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - need help with my coding
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

need help with my coding

 Post Reply Post Reply
Author
jjboy View Drop Down
Newbie
Newbie
Avatar

Joined: 10 July 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote jjboy Quote  Post ReplyReply Direct Link To This Post Topic: need help with my coding
    Posted: 10 July 2007 at 4:06am
hi there,
need help in my coding to update with my database. I'm using Access database . there is an error said updatable query in my asp page
 
<%@LANGUAGE="VBScript"%>
<%
Option Explicit
Response.Expires =0
Response.Buffer = True
 'Variable to use
 Dim strDSN   'Connection
 Dim Conn   'Object connection
 Dim rs    'Recordset
 Dim sqlIns   'Insert sql statement 
  
 'SET UP CONNECTION- DATABASE & RECORDSET
 strDSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Job.mdb")
 Set Conn = Server.CreateObject("ADODB.Connection")
 Conn.Open strDSN          
 
 
 'Variable to adding value in dbase
if (Request("btnSubmit"))="Submit" Then
 Dim strCName  ' Get Company name
  strCName = Request.Form("Tf_CName")
 Dim strPassword 'Get Company Password
  strPassword = Request.Form("Tf_Password")
 Dim strAddress  'Get Company Address
  strAddress = Request.Form("Tf_Address")
 Dim strTel   'Get Company Telephone
  strTel = Request.Form("Tf_Tel")
 Dim strEmail 'Get Company Email
  strEmail= Request.Form("Tf_Email")
 Dim strWebsite 'Get Company Website
  strWebsite = Request.Form("Tf_Web")
 Dim strCore 'Get Company Core Biz
  strCore = Request.Form("Tf_Biz")
  
      
  'ADDING INSERT SQL STATEMENT
 
 sqlIns="INSERT INTO Company_Info (C_Name, Password, Address, Tel, Email, Website, Core)"
 sqlIns= sqlIns & "VALUES ('"&strCName&"','"&strPassword&"','"&strAddress&"','"&strTel&"','"&strEmail&"','"&strWebsite&"','"&strCore&"')"
 
   'End Connection
 
  Set rs = Nothing             
  Set Conn = Nothing
  Set strDSN = Nothing
 Response.Redirect("OKRegister.asp")         
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.