Hello,<BR><BR>I have a question Im trying to create an ASP application where a user registers himself<BR>to a SQL Database only this time the application has to be retreived into Goldmine which is a <BR>contact management, Goldmine pulls data out of the SQL datbase to populate the fields.<BR>The problem that I have is that in order for Goldmine to function properly it uses a RECID and an ACCOUNTNO fields these fields are controled by the Goldmine API but I got a bit of code from Goldmine in order for the application to work here can you help me on trying to get this work? <BR>here is the code I was given from Goldmine in order to achive what I am trying to do<BR>============================================ =============================<BR><BR>The RECID and the ACCOUNTNO must be formatted specifically for GoldMine.<BR><BR>/* how to create GM AccountNo&#039s in SQL */<BR>/* first 6 chars of a GM accountno are calculated from the date */<BR>/* the first two chars are the year in two digit form. */<BR>/* and we need to calcuate the A, B or C depending on the year */<BR>/* with 12/31/1999 = 991232 */<BR>/* 12/31/2000 = A01232 */<BR>/* 12/31/2001 = A11232 */<BR>/* 12/31/2010 = B01232 */<BR>/* last 14 need to be unique so we use NEWID() */<BR>/* use this script to create 1 GM Accountno */<BR><BR>Print Char(65+(substring(convert(char(4),DatePart(YYYY,G etDate())),3,1)))+<BR>substring(convert(char(4),Da tePart(YYYY,GetDate())),4,1)+<BR>substring(convert (char(10),getdate(),20),6,2)+<BR>substring(convert (char(10),getdate(),20),9,2)+<BR>left(Convert(varc har(40),newid()),14)<BR><BR>/* for bulk operations set a static variable for the first 6 chars so */<BR>/* the SQL server does not need to keep doing the data conversions */<BR>/* Only the last 14 need to be calculated for each row on an insert */<BR><BR>declare @AccountNoFirstSix char(6)<BR><BR>set @AccountNoFirstSix = <BR>Char(65+(substring(convert(char(4),DatePart(YY YY,GetDate())),3,1)))+<BR>substring(convert(char(4 ),DatePart(YYYY,GetDate())),4,1)+<BR>substring(con vert(char(10),getdate(),20),6,2)+<BR>substring(con vert(char(10),getdate(),20),9,2)<BR><BR>/* you could use this formula in an update or an insert SQL statement */<BR>Print @AccountNoFirstSix+left(Convert(varchar(40),newid( )),14)<BR><BR>--<BR><BR>RECID&#039s need the first 7 chars to be a GoldMine SYNC stamp. Just call the <BR>GMW_NewRecID extended stored procedure to get 1 recid. Then take the first 7 <BR>chars in a static variable. Then just stick on 8 characters of a newid().