473,466 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

'create table' not coping with /

Hi,

I am trying to roduce a database for teachers to write comments about the
work students have done, and both print them on labels and store them. I
start with a table containing students names and their classes. I want the
software to produce separate tables for each class the teacher teaches.
(The reason for this is that dffernet classes will have different need for
the marking (sometimes memo fields, sometime numeric.) The Management
information system labels the classes in the format 7r/Ma4 etc. The string
'Markbook' gets assigned the 7r/Ma4. Infortunately the following produces
an error, and I've put it dow to the forward slash.

MySql = "CREATE TABLE " & MarkBk & " (ID Integer, Mark1 TEXT);"
DoCmd.RunSQL MySql

Yet I can make a table 7r/Ma4! The above code works if it is 7r\Ma4!

What's wrong?

Thanks in advance.
Nov 13 '05 #1
1 1498
On Sat, 22 Oct 2005 18:37:48 +0100, "JohnM" <jo**@jmawer.demon.co.uk> wrote:
Hi,

I am trying to roduce a database for teachers to write comments about the
work students have done, and both print them on labels and store them. I
start with a table containing students names and their classes. I want the
software to produce separate tables for each class the teacher teaches.
(The reason for this is that dffernet classes will have different need for
the marking (sometimes memo fields, sometime numeric.) The Management
information system labels the classes in the format 7r/Ma4 etc. The string
'Markbook' gets assigned the 7r/Ma4. Infortunately the following produces
an error, and I've put it dow to the forward slash.

MySql = "CREATE TABLE " & MarkBk & " (ID Integer, Mark1 TEXT);"
DoCmd.RunSQL MySql

Yet I can make a table 7r/Ma4! The above code works if it is 7r\Ma4!

What's wrong?

Thanks in advance.


Generally, you don't want to be creating tables as a normal part of the
operation of a program, you want to create tables up-front, and add records to
thos tables. If you create separate tables based on data, then you can't do
things like have a single report that can print data for any class - you'd
have to change the report design.

I would do something like this...

tblClass
ClassID (Autonumber, Primary Key)
ClassName (Text, e.g. "7r/Ma4")

tblClassMark
MarkID (Autonumber, Primary Key)
ClassID (Long Integer)
MarkNum (Integer)
MarkText (Memo)
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Phil Powell | last post by:
create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not...
7
by: Sugapablo | last post by:
Before I go building this, I want to know if it already exists. I need some PHP code that will read a web page and return all text that comes between <td></td> tags in an array. So if there...
1
by: poohnie08 | last post by:
i have a excel spreadsheet showing staff name, date,work hour, ot hour, slot1, slot2, slot3, slot4 and others). The "()" will keep repeating from day 1 until end of month. eg in excel spreadsheet,...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
by: =?Utf-8?B?R2VuY3k=?= | last post by:
Hi, I'm having a problem the coping cd's etc option is missing in Media Center. It used to be available but it has just disappeared! Can anyone help. Thanks
2
by: ericthered | last post by:
Hi, I am trying to create an offline database in VB.NET 2005, both the online and offline database use SQL Server 2005. The code I am using seems to run OK with out an exception the DATASET has the...
1
oll3i
by: oll3i | last post by:
what are coping constructors and reflexion for ? thank YOU
5
by: Dmitriy Lapko | last post by:
Hallo all Is it possible to change schema of table in DB2 v.8.2 without recreating and coping a table into a new schema? I need it for several purposes, one of them - refactoring of existing...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.