navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

submitting data to a database and incrementinting the primary key.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> submitting data to a database and incrementinting the primary key.
Page: [1]
 
Moody_99

 

Posts: 15
From: Slough, Berks, United Kingdom
Status: offline

 
submitting data to a database and incrementinting the p... - 3/15/2001 20:59:00   
PLEASE HELP ME SOMEONE? I AM STUCK HERE. I HAVE TRIED TO WORK THIS OUT FOR MONTHS. UNTIL I DISCOVERED OUTFRONT.NET.
I am submitting data from a form (using Frontpage 2000)to a database in Access 2000.

The ODBC connection is working as far as I know.

The table that is updated has a primary key (of a text data type using the format - AR-118, AR-119). Also in the database is a module that automatically increments the primary key, whenever a new record is entered. The module used is copied from the microsoft's knowledgebase and can be found at http://support.microsoft.com/support/kb/articles/Q209/8/30.ASP?LN=EN-US&SD=gn&FR=0&qry=how%20do%20you%20increment%20a%20numeric%20string&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000
. In order for this module to work a record should be inputted to start the primary key such as AR-110.

Every time a user submits data from the form, it should be submitted to the table. It should also be given a primary key such AR-111. When a second user submits data to the same table, the primary key should automatically be incremented by 1 such as AR-112.

The problem is that when data is submitted to database I am given the following error message:
Cannot update the database
Error Description: [Microsoft][ODBC Microsoft Access Driver]Error in row

Error Number: -2147217873

Error Source: Microsoft OLE DB Provider for ODBC Drivers.

Note: The pages used and the database are hosted by a hosting company. If I need to make changes of any kind I need to contact them.


IF I change the primary key data type to autonumber, the primary key is updated and all data is successfully submitted to teh data base. There is nothing wrong with the other fields such as telephone number, date and time, they are working fine.

I can't use the autonumber data type, because I have three tables and their Primary key needs to be unique such as AR- 111, DP-111, TR-111.

PLEASE HELP ME SOMEONE I AM IN DESPERATE NEED OF THE ANSWER.


Page:   [1]

All Forums >> Web Development >> ASP and Database >> submitting data to a database and incrementinting the primary key.
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts