Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2014, 06:24 AM
Registered User
 
Join Date: Aug 2014
Posts: 1
Thanks: 2
Thanked 0 Times in 0 Posts
Default error???

I don't know why this error come,where i am wrong Please help me

truyen hinh an vien
Code:
Establish database connection-------
    Dim objrs, objcon,strcon
    Dim Id,orderdate,type,comm,disc,consigneename,lcno,dat e,amount,expdate,buyerorderno,buyerorderdate,curre ncy,remarks,commagent,style,model,deldate,unit
    Dim Id,orderdate,type,comm,disc,consigneename,lcno,dat e,amount,expdate,buyerorderno,buyerorderdate,curre ncy,remarks,commagent,style,model,deldate,unit
    Set objcon = Server.CreateObject("ADODB.Connection")
    strcon="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Inetpub\wwwroot\project\order.mdb;"
    objcon.Open strcon

    Id=Request.Form("Id")
    orderdate=Request.Form("orderdate")
    type=Request.Form("type")
    comm=Request.Form("comm")
    disc=Request.Form("disc")
    consigneename=Request.Form("consigneename")
    lcno=Request.Form("lcno")
    date=Request.Form("date")
    amount=Request.Form("amount")
    expdate=Request.Form("expdate")
    buyerorderno=Request.Form("buyerorderno")
    buyerorderdate=Request.Form("buyerorderdate")
    currency=Request.Form("currency")
    remarks=Request.Form("remarks")
    commagent=Request.Form("commagent")
    style=Request.Form("style")
    model=Request.Form("model")
    deldate=Request.Form("deldate")
    unit=Request.Form("unit")



    strdml="INSERT INTO order (Id,orderdate,type,comm,disc,consigneename,lcno,da te,amount,expdate,buyerorderno,buyerorderdate,curr ency,remarks,commagent,style,model,deldate,unit) &_ 
    VALUES ('"&Id&"','"&orderdate&"','"&type&"','"&comm&"','" &disc&"','"&consigneename&"','"&lcno&"','"&date""' ,'"&amount&"','"&expdate&"','"&buyerorderno&"','"& buyerorderdate&"','"&currency&"','"&remarks&"','"& commagent&"','"&style&"','"&model&"','"&deldate&"' ,'"&unit&"')"
    objcon.Execute strdml 


  objcon.Close
  Set objcon = nothing
%> 
<form method="post">
Id :<input type="text" name="Id" size=10>
Order Date:<input type="text" name="orderdate" size=10>
Type : <input type="text" name="type">
Comm :<input type="text" name="comm" size=10>
Discount :<input type="text" name="disc" size=10>
Consignee Name : <select name="consigneename"><option>a</option></select>
L.C.No. : <select name="lcno"><option>a</option></select>
Date :<input type="text" name="date" size=10>
Amount :<input type="text" name="amount" size=10>
Exp Date :<input type="text" name="expdate" size=10>
Buyer Order No :<input type="text" name="buyerorderno" size=10>
Date :<input type="text" name="buyerorderdate" size=10>
Currency :<input type="text" name="currency" size=10>
Remarks :<input type="text" name="remarks" size=10>
Comm. Agent :<select name="commagent"></select>
Style :<select name="style"><option>a</option></select>
Model :<select name="model"><option>a</option></select>
Del Date :<input type="text" name="deldate" size=10>
Unit :<select name="unit"><option>a</option></select>
<input type="submit" value="Submit">
</form>
</body>
</html>
and the error is
Expected identifier
/project/order.asp, line 9, column 17
Dim Id,orderdate,type,comm,disc,consigneename,lcno,dat e,amount,expdate,buyerorderno,buyerorderdate,curre ncy,remarks,commagent,style,model,deldate,unit

Last edited by anvienhponline; August 11th, 2014 at 06:34 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Number: 1064 You have an error in your SQL syntax; check the manual that corre rousseauu BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 0 March 30th, 2014 04:43 AM
file system object error. automation error. library not registered shaamir BOOK: Beginning ASP.NET 4 : in C# and VB 1 September 25th, 2012 09:27 AM
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified soufya BOOK: Beginning ASP.NET 4 : in C# and VB 7 September 14th, 2011 08:08 AM
HTTP error 500: Internal Server Error in Load Testing sherin Visual Studio 2008 0 May 19th, 2010 09:02 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.