Link to home
Start Free TrialLog in
Avatar of Eddie Antar
Eddie AntarFlag for United States of America

asked on

Replication ID in New Records

Hi Experts,

I'm currently maintaining a system I built which is connected to an SQL database. The SQL database has two front end applications, 1) The native app that was built for this database and 2) my app, which extends the functionality of the original system.

It's a payroll system. And I've been asked to split one of the payments entered into multiple checks. The problem is that the table that I need to work with uses a field of data type NUMBER and field size REPLICATION ID. I need to split a single record into multiple records with different REPLICATION IDs, but I don't know how to generate a REPLICATION ID.

If this were an AutoNumber field, it would be easy to accomplish, but it's not.

ANY SUGGESTIONS?

Any help would be greatly appreciated.
Avatar of SStory
SStory
Flag of United States of America image

for the rep id, isn't it just a GUID? If so, use the NewID() function
http://www.dailycoding.com/Posts/generate_new_guid_uniqueidentifier_in_sql_server.aspx
Avatar of Eddie Antar

ASKER

Thanks for your reply, but I'm trying to find out if there is an Access solution for adding a new GUID, something that works the same as NEWID(). If I have to use a pass-through query, do you know what the syntax of that query would be?

Thanks,
E
If you create the records in your extending app, all you need is to set the table to have an AutoNumber field and for that set the field size to Replication Id. Then any new record will be assigned a GUID as the autonumber.

/gustav
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nice. Thank you for that.

E
You are welcome!

/gustav