exist

MySQL Insert on Duplicate Key.

I am building a rating system, and i want to insert a new row, if the name field does not already contain the name i want to insert, and if it does exist, i want to increase the count field by 1 For example, if i have a row the the name 'Tom' and i try to insert another row with the name 'Tom, then i want to +1 for the field count on th...

My batch file works, but for some reason also returns file not found..

My batch file reads all of the files from a windows directory with the option to include sub directories or not include them, and then saves the list to a txt file. It woks perfectly, but for some reason the application returns "File Not Found" after you answers yes or no to the sub directories question (although the question does functi...

How should I represent revisions in an XML database?

I would like to use an XML database like eXist to store and query editable form submissions, with a changelog storing prior versions of each document. How should I structure the database to easily query the latest version of each document? ...

Connect Orbeon Xform to External Exist DB

I am attempting to connect a new Orbeon XForm to an existing exist db. My code should submit an xml doc to be stored in that database. <xf:submission id="save-to-file" method="get" action="http://server:8081/exist/rest//test/test/inventory_sample.xml" replace="instance" instance="data-instance" incl...

Rename the table Column

Hi all, I am trying to execute the following query. I don't have 'CrewID' column so in that case it will by pass update part of the script. but it gives error Invalid object CrewID'. Can you please tell me why it excute update part even my if condition does not matched. Is there is another way to do the same. I have the requirement where...

How to pass an xpath into an xquery function declaration

Hi all, I use Apache Tomcat's Exist DB as an XML database and am trying to construct a sequence by passing the following xpath, defined in FLWOR's 'let' clause: $xpath := $root/second/third into a locally defined function declaration, like so: declare function local:someFunction($uuid as xs:string?, $xpath as xs:anyAtomicType?) { l...

Check if address exists before use/jump in assembly?

Say i have loaded some random address like 0x00001234 into eax. Is there a way to test that this address is valid/exists before jumping to it or dereferencing it? Or do I have to implement an exception handler? ...

SQL Server XML Column exist() query

Assuming I have a SQL Server 2005 table with an xml column containing the following values: CREATE TABLE XmlTest ( XMLid int, Data xml) INSERT XMLTest VALUES ( 1 , '<data><item><type v="1" /><value v="12.56" /></item><item><type v="3" /><value v="DEBIT" /></item></data>' ) INSERT XMLTest VALUES ( 2 , '<data><item><type v...

Can Exist query MySQL?

Greetings Gurus... Is there a way to interface with a remote mysql db from within an Exist database stored xquery? I am working on a stack that uses php as the main programming language, and xqueries are either stored on exist or they are passed along to the exist server using the php javabridge. Currently, what I have to do is constru...

IF EXIST C:\directory\ goto a else goto b problems windows XP batch files

Hi whenever i run the code below it occurs to me I have made a mistake using the if exist lines, as no matter whether the directory exists or not, it acts as if the line was never there... either that or its not reading the else line. echo off echo echo (c) Ryan Leach 2010 echo Stockmaster Backup System for exclusive use of Rive...

Applescript testing for file exist

OK, I thought this would be a simple one, but apparently I'm missing something obvious. My code is as follows: set fileTarget to ((path to desktop folder) & "file$") as string if file fileTarget exists then display dialog "it exists" else display dialog "it does not exist" end if Easy right? Unfortunately, when I run the scri...

Problem with Java Mail not being found

I am trying to use Java Mail to send emails with my program but whenever I compile on the command line I get this: RevenueSummary.java:13: package java.mail does not exist import java.mail.*; I have the mail.jar and activation.jar in my /Library/Java/Extensions folder so I'm not sure why it cannot find it. I've also tried changing my...

How to parse an eXist xQuery response with php?

Hi, I am trying to find an easy way to parse an eXist response with php without installing third party classes. This is the type of response that I would like to parse : <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist"&gt; <exist:collection name="xData" path="/db/SBXXX/00000000-00000000/sapData" created="2010-07-15T...

Executing external programs from the eXist database

Is it possible to execute an external program from within XQuery executed by eXist, and to use the result of the program in XQuery? I would imagine that this capability could be offered by an eXist function maybe in the http://exist-db.org/xquery/system module, but didn't see anything along those lines. Another way to look at this, I am...

How to get the products that all Warehouse exist?

I have a question as the title,I wanna get the products which appeared in every Warehouse, I have no idea when i thought long time,i found i am so beetleheaded, Thare are three tables in my sql server database: Product ( productID, name,model, size, color ) Warehouse ( warehouseID, name, address ) Inventory ( warehous...

What are the best wat to check file exits or not in webapplication ?

Hello, I have created a web application which is creating and updating the xml file on daily basis. i.e. Creating a xml as currentdate.xml. This have all the records of user's visited i.e IP, refferer, visited page and some more. So the same file updating from multiple users at same time. So what are the best practice to check the fi...