Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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

Reply With Quote
  #2 (permalink)  
Old February 21st, 2005, 11:05 PM
Friend of Wrox
Points: 6,468, Level: 34
Points: 6,468, Level: 34 Points: 6,468, Level: 34 Points: 6,468, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,835
Thanks: 12
Thanked 16 Times in 16 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
Reply With Quote
  #3 (permalink)  
Old February 21st, 2005, 11:15 PM
Friend of Wrox
Points: 6,468, Level: 34
Points: 6,468, Level: 34 Points: 6,468, Level: 34 Points: 6,468, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,835
Thanks: 12
Thanked 16 Times in 16 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
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12:38 PM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 01: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 12:04 PM
Accessing AutoNumber field of MS Access Using ASP MuthuAL Classic ASP Databases 1 January 22nd, 2005 11:30 AM



All times are GMT -4. The time now is 10:19 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.