Jump to content

Recommended Posts

Posted

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?

Posted (edited)

How do I get the parameters to run?

- Read Help_File at ShellExecute Edited by Vitas

_____________________________________________________________________________

Posted

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

Posted

#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.

_____________________________________________________________________________

Posted

Try this:

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

_____________________________________________________________________________

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
×
×
  • Create New...