Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 7 of 7 total |
Error 1011. |
Thu, Aug 6 2020 11:43 PM | Permanent Link |
Steve Gill | Sometimes when running the following code I get an error message.
SELECT ID AS SessionID, User, IPAddress, Process, LastConnected FROM Configuration.ServerSessions Error Message: "ElevateDB Error #1011 An error occurred with the column Name (The value vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil would result in truncation)" Most of the time the code runs fine, but every now and then it throws an error like the one above. Anyone else experience this? = Steve Delphi 10.2.3 Tokyo EDB 2.32 Build 1 Client/Server |
Fri, Aug 7 2020 2:52 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Steve
Never seen it but a few thoughts: My first thought was to try repair but then I went - this is a system database - not sure how to repair those. Second one was looking at the suspicious data the end part of the string could be an actual user name? If so it could be a slightly duff network connection, and then after reflection - but this action would take place on the server so that should be out. Next thought was the query is going to produce a canned (or insensitive) dataset. That fits with the error message - trying to fit a varchar into a field that's to small. DBISAM would just truncate but ElevateDB doesn't. This leads me to think memory corruption (caused by who knows what). The ServerSessions table is CREATE TABLE "ServerSessions" ( "ID" INTEGER, "Name" VARCHAR(40) COLLATE "ANSI_CI", "Description" CLOB COLLATE "ANSI", "Created" TIMESTAMP, "LastConnected" TIMESTAMP, "Connected" BOOLEAN, "Encrypted" BOOLEAN, "IPAddress" VARCHAR(16) COLLATE "ANSI_CI", "User" VARCHAR(40) COLLATE "ANSI_CI", "Process" VARCHAR(40) COLLATE "ANSI_CI" ) I also wonder if a weird character has crept into your database. Why its bothering with "Name" since its not in your query I don't understand, but its worth trying a repair. In fact I don't know what name refers to. Wether of not it would work I have no idea (no servers since I retired) but it might be worth running SELECT ID AS SessionID, CAST(Name AS CLOB) AS Hmmm, User, IPAddress, Process, LastConnected FROM Configuration.ServerSessions Roy Lambert |
Fri, Aug 7 2020 6:22 PM | Permanent Link |
Steve Gill | Hi Roy,
<< I also wonder if a weird character has crept into your database. Why its bothering with "Name" since its not in your query I don't understand, but its worth trying a repair. In fact I don't know what name refers to. Wether of not it would work I have no idea (no servers since I retired) but it might be worth running SELECT ID AS SessionID, CAST(Name AS CLOB) AS Hmmm, User, IPAddress, Process, LastConnected FROM Configuration.ServerSessions >> I went through pretty much the same thought process as you. It's kind of a weird one. I'll try a repair and see if that fixes it. Thanks for your ideas. = Steve |
Fri, Aug 7 2020 9:34 PM | Permanent Link |
Raul Team Elevate | On 8/6/2020 11:43 PM, Steve Gill wrote:
> Sometimes when running the following code I get an error message. > > SELECT ID AS SessionID, > User, > IPAddress, > Process, > LastConnected > FROM Configuration.ServerSessions > > > Error Message: "ElevateDB Error #1011 An error occurred with the column Name (The value vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil would result in truncation)" > > Most of the time the code runs fine, but every now and then it throws an error like the one above. > > Anyone else experience this? No but i can dupe this ServerSessions table does include the "Name" column (varchar(40)) and the error shows string that is 50 characters long (vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil). I don't think EDB maintains an actual ServerSessions table so when you query builds it on the fly from session manager data and presents result as a dataset (i think so anyways ). I looked at the TEDBSessionManager class and Name in there is defined as string (since it's delphi data type) and not limited to 40 bytes. Normally the name is filled in using the name you define for your remote session - session name in EDB Manager for example or in code . I can set the name to more than 40 characters in EDBManager for session name and i can open the session and it works ok. Did not try but i assume same is true for delphi code since we're talking Delphi data types. However when i now execute your query i get "ElevateDB Error #1011 An error occurred with the column Name (The value vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil would result in truncation))" So i suspect somehow you have ended up with a session name that is "vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil" - or in general more than 40 bytes So check how you generate and/or set your session names Raul |
Sat, Aug 8 2020 6:29 PM | Permanent Link |
Steve Gill | Hi Raul,
<< However when i now execute your query i get "ElevateDB Error #1011 An error occurred with the column Name (The value vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil would result in truncation))" So i suspect somehow you have ended up with a session name that is "vDSPFyWYEhImLSXJRUVipUZTBkEnQCLPHuxMUFbYHctEvLcOil" - or in general more than 40 bytes So check how you generate and/or set your session names >> I checked and the AutoSessioName property is set to True. The SessionName property is DBSession_1. A bit of a mystery, me thinks. = Steve |
Sun, Aug 9 2020 9:58 PM | Permanent Link |
Raul Team Elevate | On 8/8/2020 6:29 PM, Steve Gill wrote:
> > I checked and the AutoSessioName property is set to True. The SessionName property is DBSession_1. > > A bit of a mystery, me thinks. Sounds like it but is that the only session you have overall ? You're querying the server server session table so any chance some other session has that long name. Raul |
Wed, Aug 12 2020 6:25 PM | Permanent Link |
Steve Gill | Hi Raul,
<< Sounds like it but is that the only session you have overall ? You're querying the server server session table so any chance some other session has that long name.>> You were right! I tracked it down to a unit that I wrote quite a while ago that generates a random session name in a thread, and it was 50 characters long! Problem solved. Thanks for your help. = Steve |
This web page was last updated on Tuesday, April 23, 2024 at 08:10 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |