IN operator in sqlite local database
New to the whole sql world, im building my first database air application.
I have a database that i'm working with Asynchronously.
I'm trying to get a sql result that gives me a list of all the entries (rows) that match a predefined list or array.
I would like to use LIKE but that only returns to me one row in my database.
I found the operator IN but i'm not getting the desired results
with this following code
i get multiple rows results.
private function Add():void
var q:SQLStatement = new SQLStatement();
q.text = "SELECT * FROM testdb WHERE Symbol IN ('Apple', 'Orange', 'Cat');
q.sqlConnection = conn;
q.addEventListener( SQLEvent.RESULT, Add2);
q.addEventListener( SQLErrorEvent.ERROR, queryError );
q.execute();
private function Add2( event:SQLEvent ):void
var r:SQLResult = SQLStatement(event.currentTarget).getResult();
dg.dataProvider = r.data;
If i use the LIKE statement then the lettercase of the word doesnt matter but i get only one result in my Datagrid.
If i try to use a parameter, my ouput is an empty grid.
if i change to the testArray variable, i receive the same thing.
public var testString:String = "Orange, Apple, CAT";
public var testArray:Array = new Array("Orange","Apple", "CAT");
private function Add():void
var q:SQLStatement = new SQLStatement();
q.text = "SELECT * FROM testdb WHERE Symbol IN ?";
q.parameters[0] = testString;
q.sqlConnection = conn;
q.addEventListener( SQLEvent.RESULT, Add2);
q.addEventListener( SQLErrorEvent.ERROR, queryError );
q.execute();
private function Add2( event:SQLEvent ):void
var r:SQLResult = SQLStatement(event.currentTarget).getResult();
dg.dataProvider = r.data;
IS there a way to get the IN operator to work with a parameter calling an array or string?
IS there a way to get multiple results from a LIKE operator?
thanks for the help in advance
The login you connected to the server and run the above statement does not have permissions to operate on this path "C:\Users\ISLLCdba\Desktop\MAA
PROFILE PICTURES\"
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence
Similar Messages
-
Adobe AIR Local Database Questions
Hi All,
I have very limited experience using Adobe AIR but it seems really cool since I'm plenty familiar with jQuery and other web technologies. We have a client interested in creating a desktop application that would rely on the local database feature of AIR. I have some questions though before I begin development.
I understand that AIR uses SQLite correct?
How robust is this database system? Some of the larger implementations of the AIR desktop software we're planning could have 500,000+ db records, is AIR cut out for this?
Where can I get some info on making use of the local database?
Here's some other non-DB related questions:
Can we send out software updates via CD for those without an internet connection at thier location?
Can AIR allow an application to interact with a USB device?
Thanks for all your help!!Hi,
note: I'm not expert
#1
yes, AIR uses SQLite (3.6.*.? now one exactly knows as it is undocumented and sqlite_version() native function will throw runtime error to be handled)
#2
it depends for what purpose it will be used and how, yes? e.g.:
http://stackoverflow.com/questions/3160987/can-sqlite-handle-90-million-records
#3
http://www.adobe.com/devnet/air/flex/articles/air_sql_operations.html
(User experience considerations with SQLite operations)
http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_01.html
(docs)
#4
there is an option now to create native installer for platform which could be send off-line. It asks user to overwrite content if application is already installed, etc
#5
please define "interact" with USB? as disk or interface to talk with some device? Air itself cannot talk to low level ports but could start native process (NativeProcess) to some application/tool/process that could act as middle-tier between your application and usb:
http://www.adobe.com/devnet/air/flex/quickstart/articles/interacting_with_native_process.h tml
kind regards,
Peter -
Remote Database connection error on local database while running a procedur
Dear Gurus,
I am trying to run a procedure to grant Select Access to all objects of a schema to all schema but getting below error messages:
Error report:
ORA-02019: connection description for remote database not found
This is on local database and all required privileges have been given to run this procedure but I dont understand why this error is being thrown every time. I am able to fetch all the tables directly (i.e. SELECT object_name FROM user_objects where OBJECT_TYPE IN('TABLE','VIEW','MATERIALIZED VIEW') AND STATUS='VALID')
Kindly let me know if you have any solution.
Procedure detail:
declare
sqltxt varchar(250);
cursor course_det is
SELECT object_name FROM user_objects where OBJECT_TYPE IN('TABLE','VIEW','MATERIALIZED VIEW') AND STATUS='VALID';
v_objnm user_objects.object_name%type;
begin
open course_det;
loop
fetch course_det into v_objnm;
exit when course_det%notfound;
sqltxt :='GRANT SELECT ON ' || v_objnm|| ' TO public with grant option';
EXECUTE IMMEDIATE sqltxt ;
end loop;
end;
System detail:
Oracle 11.2.0.3/Linux 5.3
Ragards.
Edited by: 877938 on Mar 20, 2013 12:27 AMHi,
It seems you are fetching records from one database to other. for that you need to create dblink for that.
Create dblink first and then try to fetch records using that dblink.
ORA-02019: connection description for remote database not found
Cause: An attempt was made to connect or log in to a remote database using a connection description that could not be found.
Action: Specify an existing database link. Query the data dictionary to see all existing database links. See your operating system-specific Net8 documentation for valid connection descriptors. -
FORALL MERGE statement works in local database but not over database link
Given "list", a collection of NUMBER's, the following FORALL ... MERGE statement should copy the appropriate data if the record specified by the list exists on both databases.
forall i in 1..list.count
merge into tbl@remote t
using (select * from tbl
where id = list(i)) s
on (s.id = t.id)
when matched then
update set
t.status = s.status
when not matched then
insert (id, status)
values (s.id, s.status);
But this does not work. No exceptions, but target table's record is unchanged and "sql%rowcount" is 0.
If the target table is in the local database, the exact same statement works:
forall i in 1..list.count
merge into tbl2 t
using (select * from tbl
where id = list(i)) s
on (s.id = t.id)
when matched then
update set
t.status = s.status
when not matched then
insert (id, status)
values (s.id, s.status);
Does anyone have a clue why this may be a problem?
Both databases are on Oracle 10g.
Edited by: user652538 on 2009. 6. 12 오전 11:29
Edited by: user652538 on 2009. 6. 12 오전 11:31
Edited by: user652538 on 2009. 6. 12 오전 11:45Should throw an error in my opinion. The underlying reason for not working is basically because of
SQL> merge into t@remote t1
using ( select sys.odcinumberlist (1) from dual) t2
on (1 = 1)
when matched
then
update set i = 1
Error at line 4
ORA-22804: remote operations not permitted on object tables or user-defined type columnsSame reason as e.g.
insert into t@remote select * from table(sys.odcinumberlist(1,2,3))doesn't work. -
Synchronizing local database and server database
Hi,
I am working on an application where users store information on their laptops in a local database. Once a day, synchronizing has to take place with the server database. The clients will send their mutated data to the server and the server will send its mutated data, e.g. changed item file.
The choice of database is Mysql for the laptop, and server resides on AS400, so DB2 is the platform.
I am wondering what techniques could be used to accomplish this. Should it be done by sql or via text files? Through a socket or something else?
Does anyone have an idea what the best approach is for this matter?
And if possible, some sample code would be very much appreciated.
Thanks in advance.Hi,
There are numerous solutions to this. I have worked on a similar project a couple of years ago. The plan is as follows:
1. A java client is run on the laptop (user) which connects to the remote server on calls a procedure passing the localdata as the parameter.
2. the server parses the local data and updates itself and returns the updated data to the client.
The main considerations:
1. Connectivity: Connecting via internet to the server tunnelling through firewall or VPN ( I have no adequate knowledge on this).
2. The amount of data transfer. I was working on relatively less transactional data and hence the connection thru a dial up was not a problem.
3. The frequency of this operation. TO me it was once a day process, and hence I scheduled it during vee hours when the network was relatively free.
This is all my thoughts about the scenario. Any comments and suggestions are welcome.
Cheers,
Sekar -
Configuration Manager Error - (-9986)Session to local database...
Hello guys, I'm with a little problem.
When I try to open the Configuration Manager in a Sprowler Server, and appears this error: (-9986)Session to local database could not be opened.
But i try to resolve this problem at ODBC Connection (ODBC Data Source). But all connections is ok.
I saw that some processes of distributor are oscillating(Distributor rclient). So I saw in distributor log this error:
10:24:49 dis-nm ICM\ucce\Distributor node error checking health of process rtc.
Last API Error [109]: The pipe has been ended.
10:24:49 dis-nm Process rtc on ICM\ucce\Distributor is down after running for 0 seconds. It will restart after delaying 1 seconds for related operations to complete.
But in SQL Server, the Named Pipes is enable, in second position. I disable the Firewall but no success.
I don't able to open the Configuration Manager. Somebody can help me?
Thanks.OK, very good.
Just so I completely understand this ... On the Distributor AW, part of your Sprawler, can you use the Config Tool OK? If so, this means that the real-time feed is established to the Distributor and it can see the local database and so on.
Is the rtdist process running?
Now on the AW Client. Assuming this is configured correctly, it connects to the Distributor. Check the rtdist process to see your client AW IP address connect. Do you see this?
(I feel like we have discussed this before)
Regards,
Geoff -
I was just browsing the SQLite website when I came across the
following:
"The SQLite Encryption Extension (SEE) is an enhanced version
of SQLite that encrypts database files using 128-bit or 256-Bit AES
to help prevent unauthorized access or modification. The entire
database file is encrypted so that to an outside observer, the
database file appears to contain white noise. There is nothing that
identifies the file as an SQLite database."
Since Adobe is a member of the SQLite Consortium why don't we
see this feature added to the AIR runtime? It would be cool to have
an option like this to encrypt the local database.Many thanks for the update jasowill.
Looking forward to 1.5
xwisdom
http://xwisdomhtml.com/raxan
- The Rich Ajax Application Framework -
Lync backend databases and Lync local databases placement best practices
We are deploying Lync 2013 for 30,000 Lync users across 2 pools in 2 datacenters. Dedicated SQL server for Lync to host all databases for FE, PC and monitoring roles.
Can anyone provide guidance around disk drives for SQL databases and local databases?
Lync backend databases
Planning for Lync Server 2013 requires critical thinking about the performance impact that the system will have on your current infrastructure. A
point of potential contention in larger enterprise deployments is the performance of SQL Server and placement of database and log files to ensure that the performance of Lync Server 2013 is optimal, manageable, and does not adversely affect other database
operations.
http://blogs.technet.com/b/nexthop/archive/2012/11/20/using-the-databasepathmap-parameter-to-deploy-lync-server-2013-databases.aspx
Is it recommended to place all Lync DBs on one drive and logs on one drive or separate onto multiple drives using Databasemappath?
Lync 2013 local databases
In the Capacity Planning Guidance Microsoft
describes that the disk requirements for a Lync 2013 front end server, given our usage model, is eight disks configured as two drives.
One drive will use two disks in RAID 1 to store the Windows operating system and the Lync 2013 and SQL Express binaries
One drive will use six disks in RAID1+0 to store databases and transaction logs from the two SQL Express instances (RTCLOCAL and LYSS)
Is this enough or should we separate the local DBs and logs onto separate drives as well? Also how big do the local DBs get?During the planning and deployment of Microsoft SQL Server 2012 or Microsoft SQL Server 2008 R2 SP1 for your Lync Server 2013 Front End pool, an important consideration is the placement of data and log files onto physical hard disks for performance.
The recommended disk configuration is to implement a 1+0 RAID set using 6 spindles. Placing all database and log files that are used by the Front End pool and associated server roles and services (that is, Archiving and Monitoring Server, Lync Server Response
Group service, Lync Server Call Park service) onto the RAID drive set using the Lync Server Deployment Wizard will result in a configuration that has been tested for good performance. The database files and what they are responsible for is detailed in the
following table.
http://technet.microsoft.com/en-us/library/gg398479.aspx
Microsoft's technet recommendation contradicts the blog recommendation for Lync 2010. -
Same user in tacacs and local database with different privilege
Hi there,
i am just not sure if this is correct behavior.
i am running NX-OS image n5000-uk9.5.1.3.N1.1.bin on the nexus 5020 platform.
i have configured authorization with tacacs+ on ACS server version 5.2 with fall back to switch local database.
aaa authentication login default group ACS
aaa authorization commands default group ACS local
aaa accounting default group ACS
a user test with priv 15 is craeted on ACS server, password test2
everything works fine, until i create the same username on the local database with privilege 0. ( it doesnt matter if the user in local database was created before user in ACS or after )
e.g.:
username test password test1 role priv-0 (note passwords are different for users in both databases)
after i create the same user in local database with privilege 0,
if i try to connect to the switch with this username test and password defined on ACS, i get only privilege 0 authorization, regardless, that ACS server is up and it should be primary way to authenticate and authorizate the user.
is this normal?
thank you for help...Hello.
Privileges are used with traditional IOS. Privileges are part of "command authorization". Other operating systems (like IOS-XR, Nexus OS , Juniper JunOS) use "role-based authorization" instead of "command authorization".
So traditional IOS can use the "privilege" attribute but other operating systems can not.
Although IOS-XR, Nexus, ACE, Juniper have "roled-based authorization" feature, every single one of them use their particular attributes.
When I was configuring TACACS with ACE, Juniper and other devices I had to capture the packets to find out what were the particular attributes of ACE, what were the particular attributes of JunOS, etc, etc and to search deeply some hints the documentation , because sadly documentation is not very good when talking about TACACS details.
If you find which attributes to use, and what values to assign to the attributes then you can go to ACS and configure a "Shell Profile".
Now back to Nexus 5000. It seems this particular device has the option to mix "role-based" with "command authorization" by overriding the default roles with other roles which names are called "priv". It seems this was an effort to try to map the old concept of "privileges" to the new concept of "roles". Although you see the word "priv", it's just the name of the role. My particular point of view is that this complicates the whole thing. I would recommend to use just the default roles, or customize some of them (only if needed), but not to use "command authorization".
http://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/security/502_n1_1/Cisco_n5k_security_config_gd_rel_502_n1_1_chapter5.html
I will search the particular attributes Nexus use to talk to TACACS server. If I got them I will post them here.
Please rate if it helps -
Why we choose to use the local database for wp8?
I have some apps, all face the same problem, much data is saved in the runtime memory, it really bad for saving device resources. So I just would like to know if I transfer the data into the local database, is that helpful to save some more memory space,
after all the database is built in local file and access through the isolation storage. Could anyone tell me about how to save the memory space, I am now very tired to resolve those bugs caused by out of memory...
Help me please.Hi Situdana,
Here are some scenarios.
For instance if you have a 10MB image stored in your local database, and you would like to display. Without load the whole image to the runtime memory you cannot display the image to your user, that means in this situation, runtime memory equals more or
less 10MB.
Another example could be you need to find some data in a 10MB data file, if the file is structured, using SQLite can help you reduce the time to search and use less runtime memory.
I don't know what kind of data you saving on the runtime memory, but looks like you can manually manage the memory for instance release some IDispose() driven class when you think they are un-necessary. We can only provide a really general suggestion to
you, for more information you can ref:
Developing apps for lower-memory phones for Windows Phone 8
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
Can i use local database in webdynpro
Hai,
I want to store a string in the local database. is it possible to store in local dictionary-->structures.
using this how cani store , retrieve, update and delete the data in the local dictionary.
regards,Hi Naga,
It was discussed already:
store data in database and access
making database connection
REG: DATABASE Connection
Best regards, Maksim Rashchynski. -
let say that i access a oracle form through the web and that form access data from two distributed databases, then will there be a remote database and local database for the user or all the databases will be remote databases to the user
In my opinion.
using local databases -- access tables without DB_link
using Remote databases -- access tables through DB_link -
I had an issue with my RV320 that it suddenly stops answering DNS queries from my LAN. I just found out that a new firmware was released last month (v1.1.1.19), and one of its "known issues" is bug id CSCus07365 according to the release notes:
Sometimes the DNS process is gone and can not reply the DNS request from LAN network.
Solution: Check if you have enabled DNS local database feature on RV320/325, disable it, and then configure and save the WAN setting page again.
From that description I am not sure if this is a one-time issue after upgrading (so that I should disable and re-enable it), or if this is still a current issue and it will be better to keep away from DNS local database at all until a new firmware is released.
Thanks in advance!Please follow these directions to delete the Mail "sandbox" folder.
Back up all data.
Triple-click the line below to select it:
~/Library/Containers/com.apple.mail
Right-click or control-click the highlighted line and select
Services ▹ Reveal
from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
Quit and relaunch Mail, and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Post your results.
Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
*If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
Go ▹ Go to Folder...
from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return. -
After upgrading ACS 3.3.1 to 4.2 on windows the local database is not working
Hi,
I have upgaded the ACS 3.3.1 for windows server to 4.2. Everything went fine but the local database is not working.
The CD is an upgrade kit from 3.x to 4.2 on windows. I tried to install directly the 4.2 I was able to install but integration with AD/LDAp is not working. Anysay its an upgrade kit so I cant expect it shoud work when install drectly the 4.2 but by upgrading from 3.3 to 4.2 everything should work fine.
I followed the upgradation path as recomended.
Also we have a requirment that once it is upgraded to 4.2 we need to shift the whole thing from the physical server to a virtual machine on VMware ESX server 3.5.
Can anybody pls guide me if anything else to do after the upgradation.
Thanks & Regards
SachiHi Javier,
First of all I was facing a problem of restoring the old database of 3.3 to 4.2. Somehow I overcame that issue by following the below steps. Now local authentication is working fine but AD/other External database authentication is not working. As you told the setting for the unknown users are configured to fetch the credentials from the external database if it is not in the local database.
Do we need to do anything in the AD itself?
Regards
Sachi
Steps for ACS upgrade to 4.2 version
Below are the requested steps mentioned for the up gradation from ACS 3.3.2 to ACS 4.2.
1) Take a configuration backup from existing ACS. ACS--->System
configuration----> ACS Backup
2) now if you have ACS 3.3.2 on server. take backup of the ACS
3) Insert the cd or if you have the set up on the system then Run the setup of ACS 3.3.4. During the process it will prompt you to
upgrade existing configuration. Make sure you check that option else we will
loose the database. Now you need to hit next.next to finish the 3.3.4 upgrade.
4) Once you are at 3.3.4, take a backup and keep it handy.
5) Run the setup of 4.1.1. During this process it will prompt you to
upgrade existing configuration. Make sure you check that option else we will
loose the database. Now you need to hit next.next to finish the 4.1 upgrade.
6)Once you are at 4.1.1.24 take a backup and keep it handy.
7) Run the setup of 4.2. During this process it will prompt you to
upgrade existing configuration. Make sure you check that option else we will
loose the database. Now you need to hit next.next to finish the 4.2 upgrade.
8) Once you are at 4.2 take a backup and keep it handy. Now run the
patch 12 and take a backup again.
9) Now fresh install 4.2 on your new production server and install patch
12. Restore the 4.2 patch 12 backup and you should be all set. -
Is there a way to create a web or simlar link to a local database only?
So my situation is this
I have an access 2007 database that stores the names of customers and their usual orders.
I want to create a link to this database somehow so that anyone on the network can access something like a search page that will be stored on the desktop and it will bring up the results found.
I don't want people to have to constantly go into the database and do it that way.
The database has confidential info in it so will never go online only stay as a local database.
Im unable to install anything on these computers ie PHP, ASP, MYSQL, so it there a way of doing this without either putting the database online or installing another program.
The scenario I want is this ... Customer calls up we have either a web or form search, we tap in their name or as there's not many records even a drop down box will do and it brings up their details.
Im open to any other suggestion as to how I can achieve this.It sounds to me like you want to "split your database."
Assuming A10 or higher: Go to the Database Tools tab | Move Data | Access Database and click F1 for more help
peter n roth - http://PNR1.com, Maybe some useful stuff
Maybe you are looking for
-
Ipod nano is not recognised on my mac
I have a Mac and an ipod and a nano and have previously sync both -no problem. Now the nano is not recognised by the mac. it show 'do not disconnect' and charges ok but doesn't appear on the source list so i can't restore or sync. I've tried resettin
-
Acrobat Reader DC one source of pdf attached files
I have a MacBook Pro and found that since updating to Acrobat Reader DC there is one source of pdf attached files that do not open (I just get a black screen). I do not have this problem with my iPad nor with an iMac also running the same reader. I
-
JNDI lookups on Tomcat 5.5 and Oracle XE
Hi there! I'm using Oracle 10g XE and Tomcat 5.5.9. I just wanna get advice on how to do JNDI lookups. I know XE doesn't have native support for Java and servlets and I noticed the "jndi.jar" file is missing in XE, unlike in Oracle 10g EE. Is "jndi.j
-
HI All, How to create an accrual key / accounting key in the service pricing procedure. I have created a condition type for freight and I want this to be accounted to a separate line (Freight Clearing account) while service entry sheet is done. Regar
-
I haven't used my Apple TV for many months and then just recently went to try it. I am getting the error message I see everyone else talking about. I bought the Apple TV and HDMI cable at the apple store in December of 2011. Does Apple have a fix