Reg- Form wizard

Hi all,

I have created form wizard and i wrote insert method to insert values from form wizard to tables.

Sample code:

Form Level code:

public void insert()
{
reg.RegID = Registration_RegID.valueStr();
reg.RegistrationDate = str2Date( Registration_RegID.valueStr(),213);

if(!reg.validateWrite())
{
sysWizard.back();

}
}

But i’m unable to see the values in table which i have entered in form. Can any one have idea to resolve from this.

regards,

zahir

And where do you call reg.insert() to insert the buffer to database?

By the way, you should use text() and dateValue() instead of valueStr(). And the hard-coded date format (213) is not a good idea, the format depends on Windows locale and user settings.

Hello Zahir,

Try this code…

public void insert()

{

reg.RegID = Registration_RegID.valueStr();

reg.RegistrationDate = Registration_RegID.datevalue();

reg.insert();

if(!reg.validateWrite())

{

sysWizard.back();

}

}