StudentData 
  Hemsidan    Produkter    Tjänster    CamModul    Om MicroTech    Kontakta    stelladata.se
Produkter

 CamModul
 CamModul 3D Ny!
 TextFräsning
 CncWizard
 
 NcEdit-32
 TrigFix-32
 Cnc kommunikation
 
 IsoIntro
 IsoKurs
 MätKurs
 MekMät 
 MätData
 ProvIt!
 ElevData

 Rhino 3D
 Ritningsläsning
 BEAnalys 
 Previewer 

  MicroScribe
  ToolSetter

Frågor och svar
 CamModul
 MechPack

Övrigt

 Kontakta oss
 Om MicroTech
 Våra kunder
 Partners
 Ladda hem

 

server installation instructions (for advanced users)

How StudentData works

StudentData lets many programs share a common database to store results. The database may be stored in a simple mdb file (Microsoft Access Jet database) or in an MSDE server (Microsoft Database Engine) or SQL Server. We recommend that users with only a few students - up to about 30 - is using the mdb file solution. A server is faster and more stable in an environment with many simultaneous users.

Each computer that belongs to the group has an registry key that hast the path to a common shared so called “db pointer file”. This file contains the path (or the ODBC connection string) and the password to the database (crypto encoded). By sharing the db pointer file with all computers in the group can the administrator change password or path to the database on one place and without having to do the changes in each computer in the group.

The db pointer file can be set and/or created with the program SetDBptr the comes along with all training programs from MicroTech or from within StudentData directly.

 

If you decide to use StudentData with a database server you find instructions on how to install and create the database here.

Installing a server

If you don't have access to an SQL Server you can download and install the free MSDE server and use it on your machine or another machine in the network. 

Click here to download (aprox. 20 Mb) ---> msdex86_pkg.exe

When downloaded, follow the on screen instructions to unpack the file to a folder on your hard drive, then see the readme file for instructions on how to install the MSDE.

For more information about MSDE follow this link:
http://msdn.microsoft.com/library/techart/msdedeploy.htm

Creating an ODBC data source

  1. Go to Start/Settings/Control Panel
  2. You should have an ODBC icon, double click on it.
  3. The ODBC Data Source Administrator window appears.
  4. Click the "System DSN" tab at the top of the panel.
  5. Click the Add button.
  6. Select "SQL Server" from the list of Installed ODBC Drivers by double-clicking. This will bring up the "Create a new Data source to SQL Server" panel.
  7. Define the items on the ODBC SQL Server Setup panel as follows:

    Name = SDSERVER
    Description = StudentData server
    Server = (local)

  8. Click "next"
  9. Choose "with SQL Server authentication using a login ID and password entered by the user."
  10. Click the "Client Configuration" button
  11. Click the Net Library tab and under "Net Library Configuration,  Default Network" choose "TCP/IP Sockets" from the pull-down menu.
  12. Click "Done"
  13. This returns you to the screen where you chose "with SQL Server authentication...."  Make sure the box is checked next to "Connect to SQL Server to obtain default settings for the additional configuration options"
  14. Enter your Login ID (default: SA)
  15. Enter your Password (default: none)
  16. click "Next"
  17. If you get an error message here you probably do not have the correct ID or Password entered.
  18. Keep all defaults on the next 3 screens.  Click Finish on the third screen.  Click on the  Test Data Source button
  19. You should see a message appear at the end that says:  TESTS COMPLETED SUCCESSFULLY!
  20. Click on  the OK buttons to get back to the ODBC Data Source Administrator window; your new system data source should be listed under the   System DSN tab.

Installing the SQL Query Tool

Download and install this tool to be able to create the database on your server. After downloading follow the instructions to install and run the tool.

Click here to download (aprox 850 Kb) ---> QTODBC40_sr.exe

When starting the SQL Query Tool select the database server you just created (SDSERVER) and login with your username and password like in step 14 above.

Creating the database

Enter "CREATE DATABASE StudentData" and click on the button in the toolbar.

The program should respond: "The command(s) completed successfully."

To the right of the button you find the database selector. Click on it to open the list and then on <Refresh>. The click on it one more time and select the StudentData database.

Now, copy the script below and paste it in the Query Tool.

if not exists (select * from sysusers where name = N'ElevData' and uid < 16382)
EXEC sp_grantdbaccess N'ElevData', N'ElevData'
GO

exec sp_addrolemember N'db_datareader', N'ElevData'
GO

exec sp_addrolemember N'db_datawriter', N'ElevData'
GO

CREATE TABLE [dbo].[Lines] (
[Index ID] [int] IDENTITY (1, 1) NOT NULL ,
[Line name] [nvarchar] (50) NULL ,
[Comments] [nvarchar] (50) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Variables] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Variable name] [nvarchar] (50) NULL ,
[Text val] [nvarchar] (50) NULL ,
[Num val] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Classes] (
[ClassID] [int] IDENTITY (1, 1) NOT NULL ,
[Class name] [nvarchar] (50) NULL ,
[Belongs to line] [int] NULL ,
[Notes] [nvarchar] (50) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Students] (
[Student ID] [int] IDENTITY (1, 1) NOT NULL ,
[First name] [nvarchar] (25) NULL ,
[Family name] [nvarchar] (25) NULL ,
[Belongs to class] [int] NULL ,
[Comments] [nvarchar] (50) NULL ,
[Male] [bit] NOT NULL ,
[Password] [nvarchar] (10) NULL ,
[networkname] [varchar] (50) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Results] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Program/Book] [nvarchar] (50) NULL ,
[Version] [nvarchar] (50) NULL ,
[Date] [nvarchar] (50) NULL ,
[Time] [int] NULL ,
[Practise/Test] [nvarchar] (50) NULL ,
[Number of correct] [int] NULL ,
[Number of possible] [int] NULL ,
[Comment] [nvarchar] (255) NULL ,
[Percent OK] [int] NULL ,
[Passed] [bit] NOT NULL ,
[Timer result] [bit] NOT NULL ,
[Student ID] [int] NULL ,
[Extrainfo] [ntext] NULL ,
[upsize_ts] [timestamp] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[Lines] WITH NOCHECK ADD 
CONSTRAINT [aaaaaLines_PK] PRIMARY KEY NONCLUSTERED 
(
[Index ID]
) ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Variables] WITH NOCHECK ADD 
CONSTRAINT [DF__Temporary__Num v__286302EC] DEFAULT (0) FOR [Num val],
CONSTRAINT [aaaaaVariables_PK] PRIMARY KEY NONCLUSTERED 
(
[ID]
) ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Classes] WITH NOCHECK ADD 
CONSTRAINT [DF__Temporary__Belon__0CBAE877] DEFAULT (0) FOR [Belongs to line],
CONSTRAINT [aaaaaClasses_PK] PRIMARY KEY NONCLUSTERED 
(
[ClassID]
) ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Students] WITH NOCHECK ADD 
CONSTRAINT [DF__Temporary__Belon__15502E78] DEFAULT (0) FOR [Belongs to class],
CONSTRAINT [DF__TemporaryU__Male__173876EA] DEFAULT (0) FOR [Male],
CONSTRAINT [DF__Temporary__Passw__182C9B23] DEFAULT ('login') FOR [Password],
CONSTRAINT [aaaaaStudents_PK] PRIMARY KEY NONCLUSTERED 
(
[Student ID]
) ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Results] WITH NOCHECK ADD 
CONSTRAINT [DF__TemporaryU__Time__1CF15040] DEFAULT (0) FOR [Time],
CONSTRAINT [DF__Temporary__Numbe__1DE57479] DEFAULT (0) FOR [Number of correct],
CONSTRAINT [DF__Temporary__Numbe__1ED998B2] DEFAULT (0) FOR [Number of possible],
CONSTRAINT [DF__Temporary__Perce__1FCDBCEB] DEFAULT (0) FOR [Percent OK],
CONSTRAINT [DF__Temporary__Passe__20C1E124] DEFAULT (0) FOR [Passed],
CONSTRAINT [DF__Temporary__Timer__21B6055D] DEFAULT (0) FOR [Timer result],
CONSTRAINT [DF__Temporary__Stude__22AA2996] DEFAULT (0) FOR [Student ID],
CONSTRAINT [aaaaaResults_PK] PRIMARY KEY NONCLUSTERED 
(
[ID]
) ON [PRIMARY] 
GO

CREATE INDEX [Index ID] ON [dbo].[Lines]([Index ID]) ON [PRIMARY]
GO

CREATE INDEX [NumVariable] ON [dbo].[Variables]([Num val]) ON [PRIMARY]
GO

CREATE INDEX [LinesClasses] ON [dbo].[Classes]([Belongs to line]) ON [PRIMARY]
GO

CREATE INDEX [ClassesStudents] ON [dbo].[Students]([Belongs to class]) ON [PRIMARY]
GO

CREATE INDEX [Student ID] ON [dbo].[Students]([Student ID]) ON [PRIMARY]
GO

CREATE INDEX [ID] ON [dbo].[Results]([ID]) ON [PRIMARY]
GO

CREATE INDEX [Number of correct] ON [dbo].[Results]([Number of correct]) ON [PRIMARY]
GO

CREATE INDEX [Number of possible] ON [dbo].[Results]([Number of possible]) ON [PRIMARY]
GO

CREATE INDEX [Student ID] ON [dbo].[Results]([Student ID]) ON [PRIMARY]
GO

CREATE INDEX [StudentsResults] ON [dbo].[Results]([Student ID]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Classes] ADD 
CONSTRAINT [Classes_FK00] FOREIGN KEY 
(
[Belongs to line]
) REFERENCES [dbo].[Lines] (
[Index ID]
) NOT FOR REPLICATION 
GO

ALTER TABLE [dbo].[Students] ADD 
CONSTRAINT [FK_Students_Classes] FOREIGN KEY 
(
[Belongs to class]
) REFERENCES [dbo].[Classes] (
[ClassID]
)
GO

ALTER TABLE [dbo].[Results] ADD 
CONSTRAINT [Results_FK00] FOREIGN KEY 
(
[Student ID]
) REFERENCES [dbo].[Students] (
[Student ID]
)
GO

SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

CREATE VIEW dbo.Students_classes_lines
AS
SELECT Students.[First name], Students.[Family name], 
Students.Male, Students.[Student ID], Classes.[Class name], 
Lines.[Line name]
FROM Students, Classes, Lines
WHERE (((Students.[Belongs to class]) = ([Classes].[ClassID])) AND 
((Classes.[Belongs to line]) = [Lines].[Index ID]))

GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

CREATE TRIGGER DELCLASSES 
ON [Lines] 
FOR DELETE 
AS
DELETE [Classes] FROM [Classes], deleted
WHERE [Classes].[Belongs to line] = deleted.[Index ID]
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

CREATE TRIGGER DELSTUDS 
ON [Classes] 
FOR DELETE 
AS
DELETE [Students] FROM [Students], deleted
WHERE [Students].[Belongs to class] = deleted.[ClassID]
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

CREATE TRIGGER DELRESULTS
ON [Students] 
FOR DELETE 
AS
DELETE [Results] FROM [Results], deleted
WHERE [Results].[Student ID] = deleted.[Student ID]
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON 
GO

Finally, click on the button to execute the script.

The program should respond: "The command(s) completed successfully."

Set the password of the server

Now it could be a good idea to change the default password of the server. Enter the line below but change "mypassword" to your own password. Don't forget the password!

EXEC sp_password NULL,'mypassword', 'SA'

Click on the button to execute the command.

The program should respond: "The command(s) completed successfully."

Note! If you change the password later you also have to create a new pointer file. If you create one with the same name (re-create) you don't have to do any changes on the student workstations. 

Configure StudentData to use the new database (teacher machine)

  1. Start the program "SetDBptr.exe" in your StudenData folder.
  2. Click on "Create or select db pointer file".
  3. Click on "Yes" to create a new pointer file.
  4. Click on "MSDE or SQL Server".
  5. Click on "OK".
  6. Select "Data source for the machine" and the double click on "SDSERVER".
  7. Click on "Alternative".
  8. Select database "StudentData"
  9. Enter your username (SA) and the password as you selected earlier.
  10. Click on "OK".
  11. Enter a name for the new pointer file, e.g. "sddbpointer" and save it in a shared folder on the network (a folder that the students workstations can reach).
  12. Click on "OK" two times to end the SetDBptr program.

Configure a students workstations to use the database

On each student workstation you have to set the pointer file once. Follow these steps to set it.

Start the program "SetDBptr.exe" in your StudenData folder.

  1. Start the program "SetDBptr.exe" in your StudenData folder.
  2. Click on "Create or select db pointer file".
  3. Click on "No".
  4. Browse to the shared network folder where you created the pointer file in step 9 above.
  5. Double click on the pointer file.
  6. Click on "OK" to end the program.

 

  Hemsidan    Produkter    Tjänster    CamModul    Om MicroTech    Kontakta    stelladata.se