×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    321

    Question error -40 when trying to create table

    Dear All,

    I am trying to create one table with 39 fields in it.

    I am creating the table using sql query.

    TInt result ;
    _LIT(KQuery,"my big query with 39 fields and most of them are varchar(n)") ;
    result = iBookDb.Execute(KQuery);

    the result is having the error - 40 which is too big.
    I want to know what is maximum number of fields allowed in symbian.
    and is there any way to extend it

    thanks in advance
    Vinayak

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: error -40 when trying to create table

    check http://wiki.forum.nokia.com/index.ph...OS_Error_Codes and so some more code of yours

  3. #3
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    321

    Re: error -40 when trying to create table

    Hi Kumar,

    I have cheked that link, -40 is KErrTooLong.

    I know my querry is too long, its create table query with 39 fields.
    all those 39 fields are defined as varchar(n). where n is 250

    I want to know what is the maximum limit for this.

    and how to over come this problem, as my requirement needs me to create table with 39 fields.

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: error -40 when trying to create table

    there is documented length but you can experiment with it and try to find the what might be the length. my observation is yes it is nearly 512 by;es long

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: error -40 when trying to create table

    also check for non-SQL way of creating database.

  6. #6
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    321

    Question Re: error -40 when trying to create table

    non sql way of creating the table is also returning - 40

    is there any other way.

    plz help in this regard

  7. #7
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    321

    Smile Re: error -40 when trying to create table

    instead of varchar(n) i tried with long varchar and it solved my problem.
    now able to create table

    thanks kumar for ur help

Similar Threads

  1. Trusted Application
    By damien_a in forum Mobile Java General
    Replies: 11
    Last Post: 2012-02-17, 20:49
  2. Parsing data from txt file in J2ME
    By CSFYPMAIL in forum Mobile Java General
    Replies: 6
    Last Post: 2009-01-07, 01:30
  3. Replies: 10
    Last Post: 2007-07-02, 06:28
  4. DBMS Panic Table 9 (EDbStreamOpen)
    By symbians60 in forum Symbian
    Replies: 2
    Last Post: 2007-04-25, 08:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •