Ok. I was hoping I could set the value to a value higher than 10 without 
compiling. I'm curious why the limit is set by default to 10.

Keith

-----Original Message-----
From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On Behalf Of 
Keith Medcalf
Sent: Wednesday, January 15, 2020 2:54 PM
To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll


What did you define SQLITE_MAX_ATTACHED as when you compiled the DLL?  The 
default limit is 10.  You can dynamically decrease the limit to be less than 
the compile time limit, but you cannot increase it beyond the maximum set when 
you compiled the library.

https://urldefense.proofpoint.com/v2/url?u=https-3A__sqlite.org_limits.html&d=DwIGaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc&m=msKB5Cm5_n99wUiklx4_tVTut5zWsQjh7CN1Vh4i65A&s=ibWsJ1kdTb3PI75vFiL0vv8xOusBf31qmOx3ovzgFR8&e=
 

11. Maximum Number Of Attached Databases

The ATTACH statement is an SQLite extension that allows two or more databases 
to be associated to the same database connection and to operate as if they were 
a single database. The number of simultaneously attached databases is limited 
to SQLITE_MAX_ATTACHED which is set to 10 by default. The maximum number of 
attached databases cannot be increased above 125.

The maximum number of attached databases can be lowered at run-time using the 
sqlite3_limit(db,SQLITE_LIMIT_ATTACHED,size) interface.

--
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On 
>Behalf Of Keith Bertram
>Sent: Wednesday, 15 January, 2020 12:50
>To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
>Subject: Re: [sqlite] sqlite3_limit equivalent in 
>System.Data.SQLite.dll
>
>Hello,
>
>I'm attempting to use the new SetLimitOption added to the 1.0.112 
>version of System.Data.SQLite.dll. Either I'm not using this function 
>correctly or there is a problem within the dll. Any help you can 
>provide is greatly appreciated.
>
>        private void Button_Click (object sender, RoutedEventArgs e)
>            {
>            int iRequestValue = 20;
>            String fName = @"d:\vancouver\OpenCommsCPV.db";
>            String connStr = String.Format("Data Source={0}, 
>Version=3", fName);
>            SQLiteConnection conn = new SQLiteConnection(connStr);
>            conn.Open();
>
>            int iOldValue =
>conn.SetLimitOption(SQLiteLimitOpsEnum.SQLITE_LIMIT_ATTACHED,
>iRequestValue);
>            int iNewValue =
>conn.SetLimitOption(SQLiteLimitOpsEnum.SQLITE_LIMIT_ATTACHED, -1);  // 
>Pass -1 to get the current value.
>            if ( iNewValue != iRequestValue )
>                {
>                MessageBox.Show("Setting Num Attachments limit failed.");
>                }
>            else
>                {
>                MessageBox.Show("Setting Num Attachments limit 
>succeeded.");
>                }
>            }
>
>Keith
>
>-----Original Message-----
>From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On 
>Behalf Of Joe Mistachkin
>Sent: Thursday, October 24, 2019 8:36 AM
>To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
>Subject: Re: [sqlite] sqlite3_limit equivalent in 
>System.Data.SQLite.dll
>
>
>Yes, the NuGet packages are included in the release.
>
>Sent from my iPhone
>
>> On Oct 24, 2019, at 9:13 AM, Keith Bertram 
>> <keith.bert...@bentley.com>
>wrote:
>>
>> Ok. Thanks. Does it get immediately placed under nuget?
>>
>> Keith
>>
>> -----Original Message-----
>> From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On 
>> Behalf Of Joe Mistachkin
>> Sent: Thursday, October 24, 2019 8:12 AM
>> To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
>> Subject: Re: [sqlite] sqlite3_limit equivalent in 
>> System.Data.SQLite.dll
>>
>>
>> Within the next week or so.
>>
>> Sent from my iPhone
>>
>>> On Oct 24, 2019, at 8:37 AM, Keith Bertram 
>>> <keith.bert...@bentley.com>
>wrote:
>>>
>>> Ok. Thanks. Do you have an estimated release date?
>>>
>>> Keith
>>>
>>> -----Original Message-----
>>> From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On 
>>> Behalf Of Joe Mistachkin
>>> Sent: Wednesday, October 23, 2019 9:08 PM
>>> To: 'SQLite mailing list' <sqlite-users@mailinglists.sqlite.org>
>>> Subject: Re: [sqlite] sqlite3_limit equivalent in 
>>> System.Data.SQLite.dll
>>>
>>>
>>> Keith Bertram wrote:
>>>>
>>>> The default limit for the number of attached databases appears to 
>>>> be
>>>> 10
>>> with the
>>>> 1.0.106 version of System.Data.SQLite.dll and I would like to 
>>>> increase
>>> this value
>>>> to 25. I've used the sqlite3_limit function in the past to increase 
>>>> this
>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>https://urldefense.proofpoint.com/v2/url?u=http-
>3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-
>2Dusers&d=DwIGaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=l90Gvh
>Oo
>_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc&m=e4b8CwDAzK1-
>TKWOZZJxjXuHFSnDxxfXP6h5QVKBpaI&s=dOVM934ewvnS0gL9iui_PzN0keYUOjW48CiQW
>0X
>ea6A&e=
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite
>.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers&d=DwIGaQ&c=hmGTLOph1qd_V
>nCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-
>hoNTc&m=msKB5Cm5_n99wUiklx4_tVTut5zWsQjh7CN1Vh4i65A&s=ayq9Gghb2cXi3iy5z
>qxC5qhWhMuw7o9xfoU5AwJhQwU&e=



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers&d=DwIGaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc&m=msKB5Cm5_n99wUiklx4_tVTut5zWsQjh7CN1Vh4i65A&s=ayq9Gghb2cXi3iy5zqxC5qhWhMuw7o9xfoU5AwJhQwU&e=
 
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to