Re: [sqlite] Problem with sqlite3prepare16_v2

2013-01-06 Thread Yuriy Kaminskiy
Igor Tandetnik wrote:
> On 1/6/2013 7:10 PM, Walter wrote:
>>sqlite3_prepare16_v2 (vMdb, ws.c_str (), ws.size (), , );
> 
> The third parameter of sqlite3_prepare16_v2 is the length of the string
> *in bytes*, not in characters. You are effectively passing only half the
> statement.

Besides, *second* parameters of sqlite3_prepare16_v2 should point to *utf-16*
string, but ws.c_str() returns pointer to zero-terminated *wchar_t* string. And
wchar_t is *platform-dependent* type (and on lot of platforms it is *32-bit*
integer type [usually in ucs-32 encoding, but, again, this may vary]).

If you want to use sqlite3*16* api, you must convert strings to native-endian
utf-16 encoding (with iconv or something) first.

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


Re: [sqlite] Problem with sqlite3prepare16_v2

2013-01-06 Thread Igor Tandetnik

On 1/6/2013 7:10 PM, Walter wrote:

   sqlite3_prepare16_v2 (vMdb, ws.c_str (), ws.size (), , );


The third parameter of sqlite3_prepare16_v2 is the length of the string 
*in bytes*, not in characters. You are effectively passing only half the 
statement.

--
Igor Tandetnik

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


[sqlite] Problem with sqlite3prepare16_v2

2013-01-06 Thread Walter

Hi All

If I do this
  std::string ss= "PRAGMA  main.user_version";
  sqlite3_stmt* stmt;
  const char *tail;
  sqlite3_prepare_v2 (vMdb, ss.c_str (), ss.size (), , );
  alls well
  step and retrieve user version

However when I do this

  std::wstring ws= L"PRAGMA  main.user_version";
  sqlite3_stmt* stmt;
  const void*tail;
  sqlite3_prepare16_v2 (vMdb, ws.c_str (), ws.size (), , );

  syntax error near  '.'

Tried this

std::string ss= "SELECT data FROM tble";
prepare_v2
   Alls well. step and retrieve data

   Change that to wstring
   prepare16_v2
   no such column 'dat'

Was using 3.6.20
   Down loaded 3.7.15.1
   Same problem

What to do

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


Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Tim Streater
On 06 Jan 2013 at 22:41, Simon Slavin  wrote: 

> On 6 Jan 2013, at 7:39pm, Tim Streater  wrote:
>
>> On 06 Jan 2013 at 17:11, Simon Slavin  wrote:
>>
>>> On 6 Jan 2013, at 5:09pm, Richard Hipp  wrote:
>>>
 I am a Windows VISTA Home Basic 2007 user who needs some help, please.
 Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is
 missing.
>>>
>>> If you have iTunes or QuickTime installed, please reinstall it.
>>
>> Err, there's no point in telling *us* this, is there?
>
> If he posts that it works, then its an answer to a FAQ on this list and other
> people can post that answer in future.  The fact that the question shouldn't
> really be asked on this list is irrelevant.

In general yes, but AIUI, Richard just forwarded someone's mail to him, to this 
list. Therefore the OP won't see your reply.

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


[sqlite] Exception when querying a range index

2013-01-06 Thread St. B.
Hi All,

I have an application using sqlite to store coast lines (application runs
on windows and uses the .Net version of sqlite v1.0.83). I use range
indexes to look-up coast line within range of a given point.

During run time I find that the following exception occurs.

vtable constructor failed: MapLevel_Idx3

Occurence ratio is about 1 in 1 queries on the range index. Am I doing
something wrong, or is this supposed to be so? When the exception occurs, I
just drop the resultset and assume that no data was to be found. Should I
restart the query?

Regards,

--

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


Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Simon Slavin

On 6 Jan 2013, at 7:39pm, Tim Streater  wrote:

> On 06 Jan 2013 at 17:11, Simon Slavin  wrote: 
> 
>> On 6 Jan 2013, at 5:09pm, Richard Hipp  wrote:
>> 
>>> I am a Windows VISTA Home Basic 2007 user who needs some help, please.
>>> Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is
>>> missing.
>> 
>> If you have iTunes or QuickTime installed, please reinstall it.
> 
> Err, there's no point in telling *us* this, is there?

If he posts that it works, then its an answer to a FAQ on this list and other 
people can post that answer in future.  The fact that the question shouldn't 
really be asked on this list is irrelevant.

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


Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Tim Streater
On 06 Jan 2013 at 17:11, Simon Slavin  wrote: 

> On 6 Jan 2013, at 5:09pm, Richard Hipp  wrote:
>
>> I am a Windows VISTA Home Basic 2007 user who needs some help, please.
>> Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is
>> missing.
>
> If you have iTunes or QuickTime installed, please reinstall it.

Err, there's no point in telling *us* this, is there?

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


Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Simon Slavin

On 6 Jan 2013, at 5:09pm, Richard Hipp  wrote:

> I am a Windows VISTA Home Basic 2007 user who needs some help, please.
> Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is
> missing.

If you have iTunes or QuickTime installed, please reinstall it.

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


[sqlite] Fwd: sqlite3.dll missing, HELP please :)

2013-01-06 Thread Richard Hipp
-- Forwarded message --
From: Antonella Pepe 
Date: Sun, Jan 6, 2013 at 8:53 AM
Subject: sqlite3.dll missing, HELP please :)
To: "d...@hwaci.com" 


Hi,

I am a Windows VISTA Home Basic 2007 user who needs some help, please.
Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is
missing.

I have already downloaded the files I am supossed to from:
http://www.sqlite.org/download.html

But, when I try to run them, it's not possible, as they are not reccognized
by any program I have.

What to do?
Will updating VISTA fix this problem? I am doing so right now.

Thanks a lot, from Caracas, Venezuela :)


-- 
Antonella Pepe
 antonella.p...@gmail.com
+58 414 2905255



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


Re: [sqlite] Don't passes next tests on FreeBSD: atof1-*

2013-01-06 Thread Pavel Volkov
Hello. This is the output of:

#define _LONGLONG 1
#define __CHAR_BIT__ 8
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DEC128_DEN__ 0.1E-6143DL
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MAX_EXP__ 6144
#define __DEC128_MAX__ 9.9E6144DL
#define __DEC128_MIN_EXP__ (-6143)
#define __DEC128_MIN__ 1E-6143DL
#define __DEC32_DEN__ 0.01E-95DF
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MAX_EXP__ 96
#define __DEC32_MAX__ 9.99E96DF
#define __DEC32_MIN_EXP__ (-95)
#define __DEC32_MIN__ 1E-95DF
#define __DEC64_DEN__ 0.001E-383DD
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MAX_EXP__ 384
#define __DEC64_MAX__ 9.999E384DD
#define __DEC64_MIN_EXP__ (-383)
#define __DEC64_MIN__ 1E-383DD
#define __DECIMAL_DIG__ 17
#define __DEC_EVAL_METHOD__ 2
#define __ELF__ 1
#define __FINITE_MATH_ONLY__ 0
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_EVAL_METHOD__ 2
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_RADIX__ 2
#define __FreeBSD__ 9
#define __FreeBSD_cc_version 91
#define __GNUC_GNU_INLINE__ 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC__ 4
#define __GXX_ABI_VERSION 1002
#define __INTMAX_MAX__ 9223372036854775807LL
#define __INTMAX_TYPE__ long long int
#define __INT_MAX__ 2147483647
#define __KPRINTF_ATTRIBUTE__ 1
#define __LDBL_DENORM_MIN__ 7.4653686412953080e-4948L
#define __LDBL_DIG__ 15
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_MAX_10_EXP__ 4932
#define __LDBL_MAX_EXP__ 16384
#define __LDBL_MAX__ 1.1897314953572316e+4932L
#define __LDBL_MIN_10_EXP__ (-4931)
#define __LDBL_MIN_EXP__ (-16381)
#define __LDBL_MIN__ 3.3621031431120935e-4932L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __LONG_MAX__ 2147483647L
#define __NO_INLINE__ 1
#define __PTRDIFF_TYPE__ int
#define __REGISTER_PREFIX__
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __SIZE_TYPE__ unsigned int
#define __STDC_HOSTED__ 1
#define __STDC__ 1
#define __UINTMAX_TYPE__ long long unsigned int
#define __USER_LABEL_PREFIX__
#define __VERSION__ "4.2.1 20070831 patched [FreeBSD]"
#define __WCHAR_MAX__ 2147483647
#define __WCHAR_TYPE__ int
#define __WINT_TYPE__ int
#define __i386 1
#define __i386__ 1
#define __i486 1
#define __i486__ 1
#define __unix 1
#define __unix__ 1
#define i386 1
#define unix 1


On Sat, Jan 5, 2013 at 4:55 PM, Richard Hipp  wrote:
> On Sat, Jan 5, 2013 at 1:40 AM, Pavel Volkov  wrote:
>
>> Hello. Excuse me.
>> I found the following errors when running tests in the operating
>> system FreeBSD x32: (this is an example)
>>
>
>
> Please send the output of the following command:
>
> cpp -dM /dev/null | sort
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users