Creating database on command line from C#

Wednesday, 20 July 2016 · 3 messages · last reply 21 Jul 2016
GT
Glenn Theseira20 Jul 2016 09:14 #
Hi guys, I have an issue which I hope someone can help. I'm working on trying to use BaseX on the command line to create a database. Below is an extract of the commands I've put into a batch file: @ECHO SET CREATEFILTER *.xml> basex_auto_temp.txt @ECHO CREATE DATABASE %db_name% %dest%>> basex_auto_temp.txt "C:\Program Files (x86)\BaseX\bin\basex.bat" -c"C:\Temp\basex_auto_temp.txt" I have no issues executing the batch file in a Windows Command Prompt and it created the database I expected correctly. However, when I tried to execute the batch file from a C# Windows Forms application, for some reason, the database creation failed. It just didn't create the database. I just can't figure out why and what's the problem. I would really appreciate the help. Thank you Glenn ******************************************************************* The information contained in this mail message is confidential and may also be legally privileged. If you are not the intended recipient, please note that any use, dissemination, further distribution, or reproduction of this message in any form what so ever, is strictly prohibited. If the mail is in error, please notify me by return email, delete your copy of the message, and accept my apologies for any inconvenience caused. *******************************************************************
CG
Christian Grün20 Jul 2016 11:48 #
Hi Glenn, Welcome to the list. – I’d tend to say it’s difficult to give any helpful advice, because the problem is most probably due to your environment and the C# application. Did you manage to successfully run any other commands so far? Can you evaluate queries, receive system information via INFO, etc.? Cheers, Christian
Quoted text · Glenn Theseira · 27 lines
On Wed, Jul 20, 2016 at 9:14 AM, Glenn Theseira <Glenn.Theseira at tal.com.au> wrote: > Hi guys, > > I have an issue which I hope someone can help. > > I’m working on trying to use BaseX on the command line to create a database. > > Below is an extract of the commands I’ve put into a batch file: > > @ECHO SET CREATEFILTER *.xml> basex_auto_temp.txt > @ECHO CREATE DATABASE %db_name% %dest%>> basex_auto_temp.txt > "C:\Program Files (x86)\BaseX\bin\basex.bat" -c"C:\Temp\basex_auto_temp.txt" > > > I have no issues executing the batch file in a Windows Command Prompt and it > created the database I expected correctly. > > However, when I tried to execute the batch file from a C# Windows Forms > application, for some reason, the database creation failed. It just didn’t > create the database. > > I just can’t figure out why and what’s the problem. > I would really appreciate the help. > > Thank you > Glenn
GT
Glenn Theseira21 Jul 2016 09:24 #
Hi Christian, Thank you for your reply. I will check again my environment and C# application. It must be something I haven't done in my code. Cheers!
Quoted text · Christian Grün · 43 lines
-----Original Message----- From: Christian Grün [mailto:christian.gruen at gmail.com] Sent: Wednesday, 20 July 2016 7:49 PM To: Glenn Theseira Cc: BaseX-Talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] Creating database on command line from C# Hi Glenn, Welcome to the list. – I’d tend to say it’s difficult to give any helpful advice, because the problem is most probably due to your environment and the C# application. Did you manage to successfully run any other commands so far? Can you evaluate queries, receive system information via INFO, etc.? Cheers, Christian On Wed, Jul 20, 2016 at 9:14 AM, Glenn Theseira <Glenn.Theseira at tal.com.au> wrote: > Hi guys, > > I have an issue which I hope someone can help. > > I’m working on trying to use BaseX on the command line to create a database. > > Below is an extract of the commands I’ve put into a batch file: > > @ECHO SET CREATEFILTER *.xml> basex_auto_temp.txt @ECHO CREATE > DATABASE %db_name% %dest%>> basex_auto_temp.txt "C:\Program Files > (x86)\BaseX\bin\basex.bat" -c"C:\Temp\basex_auto_temp.txt" > > > I have no issues executing the batch file in a Windows Command Prompt > and it created the database I expected correctly. > > However, when I tried to execute the batch file from a C# Windows > Forms application, for some reason, the database creation failed. It > just didn’t create the database. > > I just can’t figure out why and what’s the problem. > I would really appreciate the help. > > Thank you > Glenn ******************************************************************* The information contained in this mail message is confidential and may also be legally privileged. If you are not the intended recipient, please note that any use, dissemination, further distribution, or reproduction of this message in any form what so ever, is strictly prohibited. If the mail is in error, please notify me by return email, delete your copy of the message, and accept my apologies for any inconvenience caused. *******************************************************************

⚡Generated with XQuery