Source language: Translate to:

Problem with DB

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Problem with DB

Postby fieldhopper » Wed Dec 04, 2013 12:46 am

Maybe hte wrong thread.

My table contains a field define as datetime inf form yyyy-mm-dd hh:ss:ss default 0000-00-00 00:00:00. Now i try to store a field define as text contains the right format yyyy-mm-dd hh:ss:ss. I use the command setvar to store, but the receiving field contains the default. Nothing happend. What is wrong ?
The DB is mysql.
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Problem with DB

Postby Gaev » Wed Dec 04, 2013 6:53 am

fieldhopper:

1) Can you confirm that the variable (containing the date value) is as expected ? ... perhaps stick an AlertBox command to verify ... I ask because of the minus signs (between year and month and day) that can be interpreted by NeoBook as a "mathematical expression" unless you place the ! character before the value.

2) Can you post the EXACT command(s) you are using ?
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Problem with DB

Postby fieldhopper » Wed Dec 04, 2013 7:00 am

That is the code:
SetVar "[bewerber.bewerber.Datum_Online]" "[bewerberonline.pa_ppx07_papoo_mv_content_1.mv_content_create_date]"
After doing the command, in the debug i can see that the datum_online has the right content, but in Db nothing happend :( .
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Problem with DB

Postby Gaev » Wed Dec 04, 2013 8:22 am

fieldhopper:

I have not used a MySQL database with NeoBookDBPro ... but with an Access Database, this code works ...
Code: Select all
SetVar "[Learn.Patients.DateStarted]" "!04/09/1992 11:53:45"
... note that Access always works with US date format ... mm/dd/yyyy

Also, according to this page ... http://dev.mysql.com/doc/refman/5.1/en/ ... erals.html ... MySQL accepts other formats ... like YYYYMMDDHHMMSS ... but you must supply leading zeroes.

Code: Select all
That is the code:
SetVar "[bewerber.bewerber.Datum_Online]" "[bewerberonline.pa_ppx07_papoo_mv_content_1.mv_content_create_date]"
After doing the command, in the debug i can see that the datum_online has the right content, but in Db nothing happend

1) Try examples like ...
Code: Select all
SetVar "[bewerber.bewerber.Datum_Online]" "!2013-04-09 11:22:44"


SetVar "[bewerber.bewerber.Datum_Online]" "20130409112244"


DefineVar "[thisDateTime]" "Integer" "" "Global" "20130409112244"
SetVar "[bewerber.bewerber.Datum_Online]" "[thisDateTime]"


2) Post the exact value displayed by an AlertBox command
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Problem with DB

Postby fieldhopper » Wed Dec 04, 2013 9:18 am

Jep, i will try tomorrow and inform you about the results.
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Problem with DB

Postby fieldhopper » Mon Dec 09, 2013 4:27 am

Code: Select all
SetVar "[bewerber.bewerber.Datum_Online]" "![bewerberonline.pa_ppx07_papoo_mv_content_1.mv_content_create_date]"


I have it. That is the right code.
THX for your notes :mrgreen: :).
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests