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 January 4th, 2006, 06:43 AM
Authorized User
 
Join Date: Jan 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question

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

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
----------------^


 
Old January 4th, 2006, 06:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Answered here: http://p2p.wrox.com/topic.asp?TOPIC_ID=38254





Similar Threads
Thread Thread Starter Forum Replies Last Post
question maheshraju ASP.NET 2.0 Basics 3 March 13th, 2008 08:54 AM
Question Ashwini Classic ASP Databases 3 January 10th, 2006 07:20 AM
Question? Calibus Classic ASP Databases 8 August 6th, 2004 08:25 AM
a question gorji C++ Programming 2 August 11th, 2003 07:41 AM





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