[sqlite] SQLITE_MAX_VARIABLE_NUMBER and .import for very wide file

2008-12-28 Thread Webb Sprague
Hi All,

What are the ramifications of increasing SQLITE_MAX_VARIABLE_NUMBER,
probably to ?  I am trying to import a csv file from the National
Longitudinal Study of Youth 79, and .import errors out, though
creating the table worked ok.

I am sure there is a better way to deal with 12K rows by 2500 columns,
but I can't figure it out  The special application for working
with NLSY only runs on Windows !  So I am trying to process SAS files
until I get to work next week.

TIA
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_get_table question

2008-12-28 Thread Dan

On Dec 29, 2008, at 7:57 AM, schachtobi wrote:

> Hi,
>
> I retrieve data (1 row only) via the handy getTable function. Inside
> this row is one blob object with pixeldata.
>
> The size is:
> 256*256 Pixels with 3 bytes each
> -> 256*256*3 = 196608 Bytes
>
> select length(data) from ch;
>
> gives me exactly this number.
>
> No I try this:
>
> typedef struct
> {
>   unsigned char red;
>   unsigned char green;
>   unsigned char blue;
> }Pixel;
>
> Pixel *dbData;
> Pixel *pSrcP;
>
> rc = sqlite3_get_table(db, cmd, ,
>   ,
>   ,
>   
>   );
>
> if(rc != SQLITE_OK || nrow!= 1 || zErrMsg!=NULL)
> {
>   printf("Error in getting data from the db\n");
>   return;
> }
> dbData = (Pixel *) result[ncol+2];

Why (ncol+2)?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3_get_table question

2008-12-28 Thread schachtobi
Hi,

I retrieve data (1 row only) via the handy getTable function. Inside
this row is one blob object with pixeldata.

The size is:
256*256 Pixels with 3 bytes each
-> 256*256*3 = 196608 Bytes

select length(data) from ch;

gives me exactly this number.

No I try this:

typedef struct
{
unsigned char red;
unsigned char green;
unsigned char blue;
}Pixel;

Pixel *dbData;
Pixel *pSrcP;

rc = sqlite3_get_table(db, cmd, ,
,
,

);

if(rc != SQLITE_OK || nrow!= 1 || zErrMsg!=NULL)
{
printf("Error in getting data from the db\n");
return;
}
dbData = (Pixel *) result[ncol+2];

pSrcP = &(dbData[4096]);

This should be well below the limit of 256*256=65536 pixels, but i get
an segmentation fault now:
r = pSrcP->red;


So now this limit (4096) is probaly the limit for near pointers on
win32, right? What way would be the best to access the whole data inside
the table, is there a way to get the data in chunks?

My compiler  is mingw32

Thank you for any hint,
Tobias
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] cancel query in sqlite

2008-12-28 Thread Kees Nuyt
On Sun, 28 Dec 2008 08:19:48 -0800 (PST), Rachmat Febfauza
 wrote in General Discussion of SQLite
Database :

>I don't know what that is in the Delphi wrapper you use.
>===
>i use zeos

You'll have to consult the zeos documentation then.
Hopefully zeos implemented the sqlite3_interrupt() call.

http://www.sqlite.org/c3ref/interrupt.html
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] cancel query in sqlite

2008-12-28 Thread Rachmat Febfauza

I don't know What that is in the Delphi wrapper you use.
===
i use zeos



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using sqlite3_exec in VB

2008-12-28 Thread Igor Tandetnik
"S Thiyagarajan" 
wrote in message news:219394.15885...@web32104.mail.mud.yahoo.com
>> Facing some issue in using sqlite3_exec in my VB application.

If you are trying to directly import SQLite API into VB (with Declare 
statements), that's not going to work. SQLite functions use cdecl 
calling convention, while VB only understands stdcall.

You can install ODBC driver for SQLite 
(http://www.sqlite.org/cvstrac/wiki?p=SqliteOdbc), then you can work 
with it from VB as you would with any other database.

Also, there are a few COM-based wrappers listed here 
(http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers) that you should be 
able to use from VB.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] cancel query in sqlite

2008-12-28 Thread Kees Nuyt
On Sun, 28 Dec 2008 06:45:45 -0800 (PST), Rachmat Febfauza
 wrote in General Discussion of SQLite
Database :

>how to cancel query in sqlite specially in delphi, coz i execute query from 
>delphi code.
>
>thanks.

http://www.sqlite.org/c3ref/interrupt.html

I don't know What that is in the Delphi wrapper you use.
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] cancel query in sqlite

2008-12-28 Thread Rachmat Febfauza
how to cancel query in sqlite specially in delphi, coz i execute query from 
delphi code.

thanks.



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] confusing with how to to this in sqlite

2008-12-28 Thread Rachmat Febfauza
thanks simon for the explanation.

after holiday, i works on how to optimize my query. actually awal1 table 
consist 12000 rows and akhir1 too. how to improve performance?

i added index on table awal1 and akhir1 with following syntax :

create index awal1i1 on awal1(Code,Category,Product,Location,"Begin");
create index akhir1i1 on akhir1(Code,Category,Product,Location,"End");

is this create index syntax right? or i must specify each column with 
individual index?? like
create index awal1i1 on awal1(Code);
create index awal1i2 on awal1(Product); etc

and i want to know to to improve performance of my query? some hint?

i have one question again, is sqlite suitable for large database file? coz my 
apps may grow up to 1 giga database file.

thanks again


  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] fail to create table

2008-12-28 Thread P Kishor
On 12/28/08, Yuanhua  wrote:
> I use sqlite to create  6 tables and the second creation always fail.
>  for example,  table names are   tb1,tb2,tb3,tb4,tb5,tb6.
>   If  I create table in the sequence   tb1,tb2,tb3,tb4,tb5,tb6,   creating 
> tb2 is in failure and other table was created.
>  Then i changed the creation sequence  to  tb2,tb1,tb3,tb4,tb5,tb6,   
> creating tb1 is in failure and other table was created..
>
>  In one word, It is always fail to create the second table. Both return 
> SQLITE_OK.
>

The trick is to not create the second table ever.

Seriously, how can anyone help without example of your code? Please
provide code, and even other info such as what kind of machine,
operating system, etc.

--
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Using sqlite3_exec in VB

2008-12-28 Thread S Thiyagarajan
Hi,

Facing some issue in using sqlite3_exec in my VB application.
I have attached a Sample VB Program where the issue could be reproduced.
I dont require any 'call back function', so using the sqlie3_exec with 3 
parameters.

There are 2 scenarios where I get errors.

1.Application crashes.
When I write out an exe file and run the .exe, it crashes
as soon as it executed the sqlite3_exec function (FYI. Eventhough
the operation is sucessful).

Please let me know why does this happen

2.If I execute inside VB itself, there is no crashing, command is 
executed properly but I get an error "Bad DLL calling convention"
Why does this occur?


(I am not sure, if you will be able to get the attachment in the group mailing, 
if not let me know the alternative method to send.)

Thanks in advance.

Best Regards
Thiyags.







  ___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] fail to create table

2008-12-28 Thread Yuanhua
I use sqlite to create  6 tables and the second creation always fail.
for example,  table names are   tb1,tb2,tb3,tb4,tb5,tb6.
 If  I create table in the sequence   tb1,tb2,tb3,tb4,tb5,tb6,   creating tb2 
is in failure and other table was created.
Then i changed the creation sequence  to  tb2,tb1,tb3,tb4,tb5,tb6,   creating 
tb1 is in failure and other table was created..

In one word, It is always fail to create the second table. Both return 
SQLITE_OK.

Thanks for help.




  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users