xsharp.eu • Moving to X# and the winner is... - Page 2
Page 2 of 3

Moving to X# and the winner is...

Posted: Sat May 04, 2019 6:43 am
by lumberjack
Hi Jeff,
BiggyRat wrote:OK. For those of you playing along at home, the winning combination in this round of X# Lotto are
I have added XSharp.VO and still no resolve...

However

Code: Select all

AAdd(aDBF, {"JobDate", "D", 8, 0}) // Note the magic 8 instead of 10
Did the trick...

Moving to X# and the winner is...

Posted: Sat May 04, 2019 7:21 am
by BiggyRat
But this code still fails...

FUNCTION Start AS VOID
// declare typed array of aDatabases objects
LOCAL aDbf AS ARRAY
//LOCAL oServer AS DBServer
// Initialize the array with the "normal" array syntax
aDbf := {}

aDBF := {}
AAdd(aDBF, {"ClCode", "C", 10, 0})
AAdd(aDBF, {"ClName", "C", 100, 0})
AAdd(aDBF, {"ClAdd1", "C", 100, 0})
AAdd(aDBF, {"ClAdd2", "C", 100, 0})
AAdd(aDBF, {"ClState", "C", 3, 0})
AAdd(aDBF, {"ClSuburb", "C", 50, 0})
AAdd(aDBF, {"ClPhone", "C", 10, 0})
AAdd(aDBF, {"ClPcode", "C", 4, 0})
AAdd(aDBF, {"ClABN", "C", 20, 0})
AAdd(aDBF, {"ClEmail", "C", 100, 0})
AAdd(aDBF, {"ClComments", "M", 10, 0})
DBCREATE("CLIENT", aDBF, "DBFNTX")
// oServer := DbServer{"Client"}
// oServer:CreateOrder("CLCode", "Client",.T.)
/* oServer:CreateOrder("CLName", "Client", "ClName")
oServer:CreateOrder("ClState", "Client", "ClState")
oServer:CreateOrder("CLPcode", "Client", "ClPCode")
oServer:Commit()
oServer:Close()

*/

RETURN

Moving to X# and the winner is...

Posted: Sat May 04, 2019 7:29 am
by lumberjack
BiggyRat wrote:But this code still fails...
Jeff, do you get an error or what is the fail?

Moving to X# and the winner is...

Posted: Sat May 04, 2019 7:37 am
by BiggyRat
Hi Johan, yes I get a runtime error, attached in my X# lottery post.

Whilst on the subject Johan, have any other field defaults changed that I'm unaware of? I'm assuming for example, memo fields are still 10?

Moving to X# and the winner is...

Posted: Sat May 04, 2019 7:54 am
by lumberjack
BiggyRat wrote:Hi Johan, yes I get a runtime error, attached in my X# lottery post.
Whilst on the subject Johan, have any other field defaults changed that I'm unaware of? I'm assuming for example, memo fields are still 10?
Jeff, no changes, D was always 8 YYYYMMDD, M 10.

Moving to X# and the winner is...

Posted: Sat May 04, 2019 8:00 am
by BiggyRat
Yes of course, I think I'm just a little bamboozled at the minute. That error messgae is:

Moving to X# and the winner is...

Posted: Sat May 04, 2019 8:14 am
by lumberjack
BiggyRat wrote:Yes of course, I think I'm just a little bamboozled at the minute. That error messgae is:
If you look at your references are they all loaded from the GAC?
Capture.JPG
Capture.JPG (23.75 KiB) Viewed 444 times

Moving to X# and the winner is...

Posted: Sat May 04, 2019 8:31 am
by BiggyRat
They were, but that since changed. As the error didn't change, I didn't think it was going to make a huge difference. Anyway, here are the latest screenshot and entire code

Code:

FUNCTION Start AS VOID
// declare typed array of aDatabases objects
LOCAL aDbf AS ARRAY
//LOCAL oServer AS DBServer
// Initialize the array with the "normal" array syntax
aDbf := {}

aDBF := {}
AAdd(aDBF, {"ClCode", "C", 10, 0})
AAdd(aDBF, {"ClName", "C", 100, 0})
AAdd(aDBF, {"ClAdd1", "C", 100, 0})
AAdd(aDBF, {"ClAdd2", "C", 100, 0})
AAdd(aDBF, {"ClState", "C", 3, 0})
AAdd(aDBF, {"ClSuburb", "C", 50, 0})
AAdd(aDBF, {"ClPhone", "C", 10, 0})
AAdd(aDBF, {"ClPcode", "C", 4, 0})
AAdd(aDBF, {"ClABN", "C", 20, 0})
AAdd(aDBF, {"ClEmail", "C", 100, 0})
AAdd(aDBF, {"ClComments", "M", 10, 0})
DBCREATE("CLIENT", aDBF, "DBFNTX")
// oServer := DbServer{"Client"}
// oServer:CreateOrder("CLCode", "Client",.T.)
/* oServer:CreateOrder("CLName", "Client", "ClName")
oServer:CreateOrder("ClState", "Client", "ClState")
oServer:CreateOrder("CLPcode", "Client", "ClPCode")
oServer:Commit()
oServer:Close()

*/

RETURN


Compiler:

Compilation successful!




RUNTIME: See Runtime screenshot and File Locations.

Moving to X# and the winner is...

Posted: Sat May 04, 2019 8:49 am
by lumberjack
Hi Jeff,
I think that is your problem. It looks first for the .dll 's in the Application folder then in the GAC.
Change the references to the GAC for all, then it will run.

Moving to X# and the winner is...

Posted: Sat May 04, 2019 8:54 am
by Karl-Heinz
Hi Jeff,

check in the XIDE Application property window -> tabpage "General" the platform radiobuttons. The platform must be "x86"

regards
Karl-Heinz