Print Page | Close Window

need help with my coding

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=23709
Printed Date: 28 March 2026 at 11:14pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: need help with my coding
Posted By: jjboy
Subject: need help with my coding
Date 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
 
< mailto:%@LANGUAGE=VBScript% - %@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")         
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net