Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread ElevateDB Error #406 Invalid table identifier (*** URGENT! ***)
Wed, May 19 2010 5:36 AMPermanent Link

Hedley Muscroft

Hi Tim,

I have a customer receiving the following error :-
"ElevateDB Error #406 Invalid table identifier 'form_blood_investigations_flow_sheet_design' in the schema Default"

My app allows customers to create "forms" and the app creates an underlying table. My guess is that the table name is too long which has caused the problem, however I can no longer access the database from my app or the EDB Manager because whatever I do continually throws the above error.

I've emailed you (support@elevatesoft.com) a URL so that you can download the database to see for yourself. Unfortunately, this has left my customer in a fix as they have spent hours designing a form and can no longer access their database. Please can you tell me how to rename the troublesome table without losing data?

BTW, if the problem is that the table name is too long, it might be helpful if EDB disallowed you from executing a CREATE TABLE with an invalid name!

Thanks Tim - hope to hear back from you shortly.

Regards,

Hedley
Wed, May 19 2010 6:13 AMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Hedley,

Indeed your table name is too long. The maximum identifier length for
any identifier is 40 characters. This has been the case since version
1.0.

You don't indicate which version of EDB you are using, and I don't know
in which version Tim did include the error message, but in v2.03B13 you
will get the same #406 error message your customer is receiving if you
try to create a table, view, etc. with the name of the identifier in
excess of 40 characters. That message is generated so you don't create
the table with that size of an identifier. Having said that you should
be able to open the database in EDB Manager because the table should
not have been created, hence the error message.

Taking a shot in the dark here...In your application do you allow your
clients to "uncreate" the form they created? If so has you client tried
that? If your application is still trying to create the table and can't
because of the length of the identifier name, I would think this issue
would resolve itself if the form was no longer there.

--
Jan


Hedley Muscroft wrote:

> I have a customer receiving the following error :-
> "ElevateDB Error #406 Invalid table identifier
> 'form_blood_investigations_flow_sheet_design' in the schema Default"
>
> My guess is that the table name is too long which
> has caused the problem
>
> BTW, if the problem is that the table name is too long, it might be
> helpful if EDB disallowed you from executing a CREATE TABLE with an
> invalid name!
Wed, May 19 2010 6:31 AMPermanent Link

Hedley Muscroft

Hi Jan - thanks for your reply.

>> You don't indicate which version of EDB you are using
Good point - I'm using v203 build 13 (Unicode) in ADO.NET (C# VS 2008).

Unfortunately, executing CREATE TABLE in this build (in ADO.NET) actually does allow you to create tables >40 chars in length.

>> Having said that you should be able to open the database
>> in EDB Manager because the table should
>> not have been created, hence the error message.

Nope - you can't access the database at all - whether I try accessing the database from .NET or even the EDB Manager - both immediately throw exception #406 and there's nothing I can do.

I've tried physically renaming (and also removing) the .EDBXxx files but I think they're still stored in the Schema (EDBDatabase.EDBCat) so it makes no difference.

Jan - if you send me your email address (mine is hmuscroft@hotmail.com) , I'll send you a download link for the database so you can take a look yourself. It contains some customer data however, hence it's sensitive.

Thanks.
Wed, May 19 2010 6:54 AMPermanent Link

gripsware

gripsware datentechnik gmbh

Hi Hedley,

maybe there is the .EDBCat.Old file in the directory which has this table not defined. So you have only to rename this file to .EDBCat.

I hope this helps
Michael
Wed, May 19 2010 6:59 AMPermanent Link

Hedley Muscroft

>> maybe there is the .EDBCat.Old file in the directory

Good idea! There is one there but unfortunately it still has the same problem - most likely a number of changes were made to the database hence the ".Old" file still contains the troublesome table.
Wed, May 19 2010 7:01 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

<< I have a customer receiving the following error :-
"ElevateDB Error #406 Invalid table identifier
'form_blood_investigations_flow_sheet_design' in the schema Default"

My app allows customers to create "forms" and the app creates an underlying
table. My guess is that the table name is too long which has caused the
problem, however I can no longer access the database from my app or the EDB
Manager because whatever I do continually throws the above error. >>

When was this table created ?  Using 2.03 Build 13, and for as long as I can
remember, you cannot create a table with that long of an identifier.  For
example, this fails:

CREATE TABLE form_blood_investigations_flow_sheet_design
(
TEST INTEGER
)

<< I've emailed you (support@elevatesoft.com) a URL so that you can download
the database to see for yourself. Unfortunately, this has left my customer
in a fix as they have spent hours designing a form and can no longer access
their database. Please can you tell me how to rename the troublesome table
without losing data? >>

I'll have to check it out and get back to you on this via email.

<< BTW, if the problem is that the table name is too long, it might be
helpful if EDB disallowed you from executing a CREATE TABLE with an invalid
name! >>

See above.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 19 2010 7:06 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

<< Unfortunately, executing CREATE TABLE in this build (in ADO.NET) actually
does allow you to create tables >40 chars in length. >>

I just tried the following in VS2008 and it issues an exception due to the
identifier:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Elevate.ElevateDB.Data;

namespace ElevateDBCreateTable
{
   public partial class Form1 : Form
   {
       public Form1()
       {
           InitializeComponent();
       }

       private void button1_Click(object sender, EventArgs e)
       {

           EDBConnection DataConnection = new
EDBConnection(@"TYPE=LOCAL;CONFIGPATH=C:\Unicode;DATABASE=ADOUnicodeTest;UID=Administrator;PWD=EDBDefault");

           DataConnection.Open();

           EDBCommand DataCommand = new EDBCommand();

           DataCommand.Connection = DataConnection;

           // Check to see if the database exists, if it doesn't, then
create it

           DataCommand.CommandText = "CREATE TABLE
form_blood_investigations_flow_sheet_design (TEST INTEGER)";
           DataCommand.ExecuteNonQuery();

       }
   }
}


--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 19 2010 7:07 AMPermanent Link

gripsware

gripsware datentechnik gmbh

Hedley,

so I think only Tim can help you.

Michael
Wed, May 19 2010 7:23 AMPermanent Link

Hedley Muscroft

Hi Tim,

Thanks for your quick reply. The customer created the form yesterday but I've just checked and he's using a slightly older version of my app which is using EDB 2.03 build 9.

You're absolutely correct - we can't CREATE TABLE with >40 chars with the latest build - sorry, I should have checked that first.

None the less, I'm still stuck with this database which I can't access FrownHope you can help!

BTW - is there any way to edit a database catalog (EDBDatabase.EDBCat) file directly? If so, then I could presumably rename the troublesome table (and the corresponding .EDBXxx files) to fix this.

Thanks Tim.
Thu, May 20 2010 11:35 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

Fixed via email.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image