Sequence issue in XE8

I recently upgraded a Delphi XE6 project to XE8 and am having an issue 
selecting from a sequence field

This code always returns 1 now where it used to return the next # in the 
sequence which is > 300,000 at this point


     dm.UtilQuery.SQL.Text := Format('SELECT current_value FROM 
sys.sequences WHERE name = %s', [QuotedStr('invoicenumber2')]);
     dm.UtilQuery.Open;
     if dm.UtilQuery.Eof then
       raise Exception.Create('cant get invoice number');

 
dm.tmpOrderInvoiceNumber.AsString:=Format('%.6d',[dm.UtilQuery.FieldByName('current_value').AsInteger+1]);
0
Mike
5/1/2015 8:12:37 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

1 Replies
776 Views

Similar Articles

[PageSpeed] 28

On 5/1/15 4:12 PM, Mike Margerum wrote:
> I recently upgraded a Delphi XE6 project to XE8 and am having an issue
> selecting from a sequence field
>
> This code always returns 1 now where it used to return the next # in the
> sequence which is > 300,000 at this point
>
>
>       dm.UtilQuery.SQL.Text := Format('SELECT current_value FROM
> sys.sequences WHERE name = %s', [QuotedStr('invoicenumber2')]);
>       dm.UtilQuery.Open;
>       if dm.UtilQuery.Eof then
>         raise Exception.Create('cant get invoice number');
>
>
> dm.tmpOrderInvoiceNumber.AsString:=Format('%.6d',[dm.UtilQuery.FieldByName('current_value').AsInteger+1]);
>

I was forced to move to FireDac to remedy this and a few other issues I 
encountered in XE8.  Lesson learned about jumping head first into a 
Delphi release.  I know better.

That said, holy crap firedac is fast and well designed.  I finally got 
my money's worth for this enterprise SA product.
0
Mike
5/4/2015 8:28:03 PM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

Delphi 2009 automatic bug reports appear as Delphi.NET issues
For automatic bug reports, Delphi 2009 seems to put 'Delphi.NET' into the field for 'Project'. I will try to verify it and enter it in QC. Unfortunately this means I have to use the QC database for 'testing', but will delete my test entries if I have verified the problem. Michael Justin Michael Justin wrote: > For automatic bug reports, Delphi 2009 seems to put 'Delphi.NET' into > the field for 'Project'. AFAIK this is as expected. There is no project "RAD Studio" and so "Delphi.NET" has been choosen as proj...

HTML Editor Library trial is now available for Delphi 6
HTML Editor Library trial is now available for Delphi 6 - Delphi XE8 Please use the following link to download the trial: http://delphihtmlcomponents.com/editor.html Hi! Do you have another emailadress than the support@delphihtmlcomponents.com, because I would like to upgrade to the Editor-package, but I can't email you. Gruß aus den Bergen Günter Please use asviridenkov at gmail.com > {quote:title=G|nter Kieninger wrote:}{quote} > Hi! > > Do you have another emailadress than the > support@delphihtmlcomponents.com, because I would like t...

FastScript in Delphi XE8
I am converting from Delphi 2006 to Delphi XE8, and am now nearing the finish line, but have one remaining major roadblock: FastScript I use Fastscript very heavily as a way to allow our users to write scripts that can extend our software as much as they like, including creating forms and adding buttons. This is not working. A specific problem that I have, is that code that works great in Delphi 2006 does not work in Delphi XE8. Specifically, if my script contains a reference to a "TForm", or "TBitBtn" (as well as many other components), then FastScript will return ...

FastScript in Delphi XE8
*Edit: This is now solved, but I leave the original message below for reference. The solution was essentially to delete all traces of FastReports (That's "Reports", not "Script") from the computer, as it was interfering with FastScript. This was actually fairly involved to do, and we did it under the supervision of someone from FastScript tech support, who was extremely helpful. If you run into the problem described below, be sure to contact their technical support and see if maybe you are experiencin g the same issue, and how to resolve it. I hope this is helpfu...

Indy 10.1.15 (Delphi 2007) and POP3 dl issues (continuing IMAP4 thread with message DL issues)...
Hi, Are there known problems with Indy 10.1.15 and POP3 downloads...? I see that the same program compiled with Indy 10.1.15 and Indy 10.5.x behaves differently with POP3 servers and messages... In short, seems Indy 10.1.15 has the same issues with POP3 Indy 10.5.x has with IMAP4 and TidMessage/MessageClient, meaning that some messages or attachments do not get downloaded if there are dots at the begining of the line... Kind Regards, B. "Zlatibor Urosevic" <zlatibor.urosevic@gmail.com> wrote in message news:206328@forums.codegear.com... > In short...

Rounding Issues in Delphi
Why delphi doesn't round well? Anybody there who have solutions? How can i round 28.255 - 28.259 as 28.26. How can i round 28.250 - 28.254 as 28.25? Roundto doesn't round well, I also use getting the fraction of it then add 0.01 if needed. Anyone who done this rounding problem accurately? Thanks. I think you need to read this http://docs.sun.com/source/806-3568/ncg_goldberg.html To summarise, computers don't handle float numbers very well. You probably need to change the datatype to currency or something else. > {quote:title=Jojo de la Cuesta wrote:}{qu...

Delphi 5 with ADO
Hi I'm having some problems adjusting a Delphi5/MSSQL database application, which i did not wrote (what's more: i'm not a Delphi expert either) so i thought maybe someone in this comunity will enlighten me. It' about an SQL command which is issued by this delphi5 application (the sql command was traced in SQL server with profiler), but which is nowhere to be found in the souce code. I've searched already all the components which i knew that could issue the SQL command (TADOQuery, TADOCommand) but with no l uck. Could anyone tell me other misterious places where i shou...

Minor out-of-sequence issue
Jeez, this is a work of art! Nice job. As I've been playing with it, I hit one very trivial issue that you may want to add to your notes for v6.1 ... You might recall, Steve, that a while back I mentioned that I had run the Windows side and tried to "Install SpinRite on Drive" specifiying my C drive. The messages I got were out-of-sequence in that first it told me I couldn't install from the same drive, and that I should re-run SR from another drive. We agreed that the first message should have been that Drive C: was not a removeable drive, rather t...

C2S Sequence issue
We ve the below problem. We are using RSA Tokens incombination with C2S BM 3.8. All is working fine except in one case. The client to site BM server handles all the authentication of the users but when a user tries to login from a other partition the user is blocked with a message FFFFF996. (Only with RSA sequence, when NDS is used there is no problem) The Windows 2000 server with RSA doesn't even see the try of the user to logon. At the other hand the Windows 2000 server with RSA server can tree walk the complete tree so this is no problem. So i decided to put NMAS tr...

Having issue with ado.net
 I'm trying to use ado.net to compare values from a ListBox against a query. Depending on the comparison I want to either update or insert the value from the ListBox.I get this error and have no idea what it means: The type or namespace name 'SqlConnection' could not be found protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new ConfigurationManager.ConnectionStrings["OrderConnectionString"].ConnectionString; SqlCommand cmd = new SqlCommand("select storeID from [exportProfile] where storeID = '" + st...

ASA7, ADO and Delphi
Hello! I've got a problem with accessing a database via ADO with Delphi 5. Everytime I set the ADOConnection active I get the error "Invalid enum value". I'm using Delphi 5 Enterprise and ASA7 with EBF #449. Is there anybody who ever get an ADOConnection to ASA7 with Delphi 5? Gruesse, Matthias I'm using C++ Builder 5 and get the same problem. I've asked this question before and no one seems to be able to respond... Matthias Hovestadt wrote: > Hello! > > I've got a problem with accessing a database via ADO > with Delp...

Web resources about - Sequence issue in XE8 - embarcadero.delphi.ado

Sequence - Wikipedia, the free encyclopedia
"Sequential" redirects here. For the manual transmission, see Sequential manual transmission . For other uses, see Sequence (disambiguation) ...

Sequence - Wikipedia, the free encyclopedia
"Sequential" redirects here. For the manual transmission, see Sequential manual transmission . For other uses, see Sequence (disambiguation) ...

TV title sequences that are as unmissable as the shows that follow
TV credit sequences were once a mere formality, but not any more.

'Batman v. Superman: Dawn of Justice': Lego set may have revealed major battle sequence; Connection to ...
Battle scene involving Lex Luthor, Batman, Superman and Wonder Woman reportedly teased in Lego toy set.

Join digits for big points in Sequence – Connecting Numbers
Sequence - Connecting Numbers 13 Thieves Threes! Two Dots The Mesh Join digits for big points in Sequence – Connecting Numbers is a story ...

Guru denied copyright protection for Bikram yoga sequence of postures
Bikram Choudhury atop a student. (credit: tiarescott ) Sure, DC Comics can copyright the Batmobile . However, Yoga guru Bikram Choudhury, infamous ...

The director of last night's episode of 'The Leftovers' explains that bizarre opening sequence
Warning: Spoilers ahead HBO's "The Leftovers" kicked off its second season Sunday night and didn't hold back on continuing to test its audience ...

"What In The World Just Happened There!?" Maryland & Northwestern Combine For Wild Sequence
Northwestern is sporting its best men’s basketball team in years—maybe ever, given that the Wildcats have never, ever made the NCAA tournament—and ...

'American Idol's' Final Season Opening Sequence Is Pure Nostalgia
The farewell season of 'Idol' is around the corner, and it's time to take a walk down memory lane.

Court: Hot Yoga's Sequence of Poses Can't Be Copyrighted
The founder of a popular form of yoga that is performed in a room heated to more than 100 degrees lost a court appeal Thursday to copyright a ...

Resources last updated: 1/16/2016 5:37:08 AM