Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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
  #1 (permalink)  
Old February 21st, 2005, 10:49 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default MS Access Field Name

Hello!

I have an access database, with a field name "GROUP". As "GROUP" is a reserve word thus using SQL query from ASP page I cannot insert data into this field.


Sql="Insert into patient(NAME, GROUP) VALUES ('ZEESHAN AHMED', 'A+')"


Is there any solution for this Issue. Please note that I CANNOT change the field name.


Thank you,
Zeeshan Ahmed

  #2 (permalink)  
Old February 21st, 2005, 11:05 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Sounds like the person who designed the datastore needs a good talking to. IMO you cannot use reserved words under any circumstances.

;;Please note that I CANNOT change the field name.
I assume the page has never worked. If I may say so, you should have the ability to change a development datastore. What are your hurdles?

BTW This is also a reserved word in SQLServer and mySql

I am very interested to hear if there is a solution

Wind is your friend
Matt
  #3 (permalink)  
Old February 21st, 2005, 11:15 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

A good habbit to get into for future. Prefix table and fields names with some relavent characters, Eg:
tablename = tblSomeName
fieldName = fldSomeName

This way you never have to worry about learning the reserved word list nor ever using one by mistake.

Wind is your friend
Matt
  #4 (permalink)  
Old February 22nd, 2005, 12:25 AM
Authorized User
 
Join Date: Aug 2004
Location: Calicut, Kerala, India.
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please try

Sql="Insert into patient([NAME], [GROUP]) VALUES ('ZEESHAN AHMED', 'A+')"

Shibu Narayanan
Software Associates


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
MS ACCESS UPDATING A SUBFORM FIELD bernieregans SQL Language 1 February 3rd, 2006 04:26 PM
updating yes/no field in MS Access database enigma82 Classic ASP Databases 2 May 6th, 2005 11:04 AM
Accessing AutoNumber field of MS Access Using ASP MuthuAL Classic ASP Databases 1 January 22nd, 2005 11:30 AM





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