In access open the debug window (Ctrl+G) and then write Docmd.runsql(\"CREATE TABLE MyTable( ID bit, txt MEMO)
followed by enter. YOU WILL GET A TABLE with a Yes/No (TRUE/FALSE) and a memo (notat) field. How you build your SQL to do this is more than likely the problem!
I suggest that you try and copy the contents of the SQL into Access and see if it works there. I thing its because the NOT NULL should be in the CONSTRAINT of the CREATE TABLE. Look at HELP in Access for how to do this.
Jeg har prøvet hjælp i Access, og det virker fint, hvis jeg bare sætter de 2 nævnte felter til CHAR(50) men problemet er at så passer det ikke til vores hjemmeside, hvor de skal bruges...
Men i hjælp til Access, har Microsoft ikke lært at lave et eksempel på hvordan man gør dette fra en alm. sql sætning....
snabela> I dont have too much experience in creating tables from ASP code. But if I look at your example it doesnt look right. The CONSTRAINTS should come after the CREATE TABLE and your REFERENCES is also incorrect. You have to include the foreign table and the foreign field.
snabela> Not sure how you can reject my answer! Youa sked how to create a table with a YesNo and a notat field, YOU GOT ANSWER for this! CREATE TABLE MyTable( ID bit, txt MEMO) If you want to create a table with CONSTRAINTS was NOT a part of the original question. So how you can give yourself the points for this
<tabelnavn> YesNo og <tabelnavn> NOTE
..is VERY strange!
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.