Page 6 of 6
Re: MySQL and HMG
Posted: Thu Jun 18, 2009 4:39 pm
by Rathinagiri
For me it is working fine Sudip. I don't know where could be the error.
Can you send the back up of .sql file with some lines of data?
Re: MySQL and HMG
Posted: Fri Jun 19, 2009 3:01 am
by sudip
Hello Rathi,
I am sending some codes which will automatically create a database, Info and a table Accyr.
Now please add an accounting year in "Accounting Year" form by pressing Ctrl+A. Save it. Close the program and try to run the software again.
Please download
Please note that these codes are unfinished.
TIA.
With best regards.
Sudip
Re: MySQL and HMG
Posted: Fri Jun 19, 2009 3:52 am
by Rathinagiri
Hi Sudip,
Please update the query function with the following code:
Code: Select all
function sql(dbo1,qstr)
local i, j
local table := nil
local currow := nil
local tablearr := {}
local rowarr := {}
local curdateformat := set(_SET_DATEFORMAT)
set date ansi
table := dbo1:query(qstr)
if table:neterr()
msgstop(table:error())
table:destroy()
set(_SET_DATEFORMAT,curdateformat)
return tablearr
else
if table:lastrec() > 0
asize(tablearr,0)
for i := 1 to table:lastrec()
asize(rowarr,0)
currow := table:getrow(i)
for j := 1 to table:fcount()
aadd(rowarr,currow:fieldget(j))
//msgbox(currow:fieldget(j))
next j
aadd(tablearr,aclone(rowarr))
next i
endif
table:destroy()
set(_SET_DATEFORMAT,curdateformat)
return tablearr
endif
return tablearr
Re: MySQL and HMG
Posted: Fri Jun 19, 2009 5:13 am
by sudip
Hi Rathi,
Thanks a lot! Problem is solved.
With best regards.
Sudip