Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record ID generator question
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00605839
Message ID:
00606268
Vues:
35
>with is the concept of record id's, (identity columns, etc.) as they pertain to web-based applications, (ie we want the id value without having to refresh the web page, so identity columns will not work.)
>>
>
>I don't know what you mean by this. When a 'new' is submitted from the web page, the script/program sends an insert to the server, then queries for the identity, once it has that it returns whatever to the browser... there is no extra trip. You could also have SP's that do your inserts and return the identity value as an output parameter, so you wouldn't even need a second query from the middle tier to the server to get the id.
>
>BOb

Thanks for your response Bob!

I should have elaborated a bit, (I didn't because I thought my message was too long in the first place...)

We are using Delphi and a third party framework (ASP Express, from Marotz) to develop COM+ web components. We have presentation components that create the HTML output that displays for each page. These presentation components call business components that interface with the SQL Server database. It is due to the nature of the third party product, and the way it handles XML datasets that we are required to either:

1.) Use their id generation method (which we started to do, but it only works if everybody is calling the COM+ components on the same server. Their ID generator is file based, and thus resides on each COM+ server. So if three developers each have COM+ components on their own machines, and are hitting the same database, the three generator files are out of synch after the first insert.)

2.) Allow the database to handle the ID generation (i.e. with identity columns). But, again, due to the methods provided by the third party product, we would have to perform additional dataset reloading to refresh the XML datasets.

OR

3.) Develop a method of providing our own id's (i.e. my first post) and obtain the value of the id before ever inserting the record. This would prevent us from having to reload the data after the insert had occurred.

Unfortunately, the third party framework has been mandated, so getting rid of it is not an option. This third party framework has given us a lot of help in the way of creating web pages, but it has also brought about a few challenges for us in trying to figure out how to do things that are normally simple to do, (such as this, which you stated in your reply).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform