Author Topic: SambaPOS Training Mode  (Read 46135 times)

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
SambaPOS Training Mode
« on: February 01, 2012, 06:32:21 am »
Welcome to SambaPOS Training Mode.

What I have created is a tool to enable a SambaPOS Training Mode on SambaPOS.
What the tool actually does is to copy the SambaPOS Microsoft SQL Express 2005/2008 Server instance or Microsoft Compact SQL Server database to a Microsoft Compact SQL Server database file called SambaTrain.sdf, and change the SambaPOS data source settings automatically with the click of a single icon and once you exit SambaPOS, the data source settings are returned to the live settings.

Latest version - V4.0 - http://forum2.sambapos.org/index.php/topic,184.msg6222.html#msg6222


You can also have the database refresh each time you run SambaPOS Training Mode, or to refresh on-demand if you are developing new features, or expanding the POS system.

« Last Edit: March 28, 2013, 03:18:02 am by JohnS »
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: SambaPOS Training Mode
« Reply #1 on: February 01, 2012, 08:32:50 am »
Cheers John,

I'll try it out later.

By the way, Thanks!

Edgar

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS Training Mode
« Reply #2 on: February 02, 2012, 03:34:20 am »
John your latest update is a big improvement and that makes you a SambaPOS Dev :)
I want to include your script in SambaPOS setup. Is it possible to get rid of c:\sambatrain and use current directory instead?

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #3 on: February 02, 2012, 03:49:27 am »
I was thinking the same.

Do you want it in a sub directory under SambaPOS2 called Training or just in the main directory?
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS Training Mode
« Reply #4 on: February 02, 2012, 03:58:57 am »
It will be fine if it works under a sub directory. If it helps during setup I can call install.vbs with current installation directory information or anything else.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #5 on: February 02, 2012, 04:12:35 am »
The install script is designed to be run once you have SambaPOS up and running in your production environment.

As it is right now, if you change the database connection or location of the SambaSettings.txt file, after you have run install.vbs, the training scripts will not work.
I will change this to read the settings each time you run training mode, that way if you change databases or location of the settings file, it will work it out and run training mode.
SambaPOS - POS'n the World, one Terminal at a time.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #6 on: February 02, 2012, 09:54:43 am »
Emre,

Well its at V3.0 now. Rewrote most of it so it's now just one script to do everything.
The script discovers its location and folder name, but it has to be placed in a sub directory under SambaPOS2 to work.

Test it, and let me know if you have any issues.

Features
- Will work with SQL Server Compact & SQL Server Express Databases (both local and networked)
- Checks if SQL Compact Server is installed
- Dynamic execution - no configuration required

« Last Edit: February 15, 2012, 09:10:06 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS Training Mode
« Reply #7 on: February 02, 2012, 10:11:26 am »
On my first test it worked great... Really good idea, awesome solution.
I'll test it more but I think it is ready for next release.. Thank you very much!

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS Training Mode
« Reply #8 on: February 08, 2012, 10:59:10 am »
For the record: Training script included in setup.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: SambaPOS Training Mode
« Reply #9 on: February 09, 2012, 12:50:36 am »
Hi John,
Tried running training mode today and got error shown on screen shot.

What are the conditions for the script to work.

Could it be because I have sql server and sql compact on my laptop?

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #10 on: February 09, 2012, 01:39:08 am »
Edgar,

Its a file permission error.

You need SQL CE on the system to run training mode. Both MS SQL & SQL CE can exist on the same system.
Are you logged in as an administrator or restricted user?

Try this
1. Log into SambaPOS, go to Local Settings and make sure you are using MS SQL and not CE and exit.
2. Run Training.vbs again

I just tested and it has worked fine, but I did need to log into SambaPOS first.
SambaPOS - POS'n the World, one Terminal at a time.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #11 on: February 12, 2012, 10:43:45 pm »
Updated version to fix file permission errors on restricted user accounts.

I have tested on both Win 7 and Server 2003 with both standard and administrator accounts.
Please let me know if you have any issues.

Notes
- Training Compact SQL file is now located in the same folder as SambaSettings.txt file.
- Training SQL file called SambaTrain.sdf
« Last Edit: February 14, 2012, 08:09:27 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: SambaPOS Training Mode
« Reply #12 on: February 14, 2012, 04:45:00 am »
Thank you John. Good solution.
I'll update your script on next release.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: SambaPOS Training Mode
« Reply #13 on: February 14, 2012, 07:49:11 am »
Hi John,

Run training mode script shortcut on desk top and found sambapos would start up in normal mode, ie ticket no would increment and when I restarted Sambapos from normal shortcut, found the next ticket no was incremented the last ticket no generated in training mode.

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: SambaPOS Training Mode
« Reply #14 on: February 14, 2012, 07:55:53 am »
Edgar,

Are you running Compact SQL ? If so, whats the location of your sdf file.
Whats the location of your SambaSettings.txt file ?
« Last Edit: February 14, 2012, 08:11:45 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.