Jump to content
Sign in to follow this  
plgii

start database issue

Recommended Posts

plgii

I need to start a database server

I try:

RunWait(@ComSpec & " /c " & "dbeng9 -n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all")

but only the dbeng9 runs. How do I get the parameters to run?

Share this post


Link to post
Share on other sites
GodlessSinner

How do I get the parameters to run?

- Read Help_File at ShellExecute Edited by Vitas

_____________________________________________________________________________

Share this post


Link to post
Share on other sites
plgii

This is the script and when it runs I get error:

Can not redeclare a constant.:

Global Const $PBS_SMOOTH = 0x00000001

Global Const ^ ERROR

code to start db works on its own

dbstarttest.au3

Share this post


Link to post
Share on other sites
GodlessSinner

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#include <StaticConstants.au3>
Global Const $PBS_SMOOTH              = 0x00000001; The progress bar displays progress status in a smooth scrolling bar
Global Const $PBS_MARQUEE            = 0x00000008; The progress bar moves like a marquee
Global $i=0
Do
            GUICreate("Start Database", 410, 380,-1,-1,$WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST)
            GUICtrlCreateLabel("STARTING SPIRITPOS DATABASE...PLEASE WAIT", 60, 30, 350, 300)
            GUISetState(@SW_DISABLE)
            $Progress6 = GUICtrlCreateProgress(24, 86, 360, 25, BitOR($PBS_SMOOTH,$PBS_MARQUEE))
            GUISetState()
            AdlibEnable("Advance", 50)
Until ProcessExists ( "dbeng9.exe" )
FileChangeDir("d:\program files\sybase\sql anywhere 9\win32")
RunWait("dbeng9.exe -n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all")

Func Advance()
For $i = 0 To 100 Step 1
GUICtrlSetData($Progress6, $i)
Next
EndFunc

You seen an error, because Global Const was inside Do..Until, - Global Const must be declared only once.


_____________________________________________________________________________

Share this post


Link to post
Share on other sites
plgii

Tried that, but when you run it it runs wild and fires the program several times

Share this post


Link to post
Share on other sites
GodlessSinner

Try this:

FileChangeDir("d:\program files\sybase\sql anywhere 9\win32")
ShellExecute("dbeng9.exe", "-n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all", "", "")

_____________________________________________________________________________

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.