Author |
Topic  |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 22 September 2004 : 05:23:01
|
What query (in MS Access 2000) might I use to create a new record in a table which has only one field, which is an autonumber? |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 22 September 2004 : 06:06:33
|
I dunno. Never tried that before. Maybe inserting 0 into the auto_number field? Don't know if that will give you an error. Probably will.
You might have to create a second column that accepts nulls, and just insert null values into it. |
Support Snitz Forums
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
miperez
Junior Member
 
Spain
243 Posts |
Posted - 22 September 2004 : 07:35:22
|
I was also wondering. The only possible use I can find is to use that table as a counter, but I'd rather use an integer value in a table. |
Best Regards
Mikel Perez
"Hell is the place where everything test perfectly, and nothing works"
|
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 22 September 2004 : 07:44:10
|
Hey D3mon, what's the plan? It does sound like a 'wouldn't start from here' question, so I think we'd all be keen to see what it is you're planning to do, and then maybe advise a bit better? |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 22 September 2004 : 11:38:35
|
so really you could just dump the 1-col table and just enter the FK field from the session var? No need to relate anything this way, and you can just select blah from [onetable] where [fkfield]=[mysessionvariable]. You could even use the sessionID as the identifier, so it will be nice and unique :)
just my thoughts |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 22 September 2004 : 13:04:20
|
You can also add another meaningful field, such as date/time for the basket creation, so that you can simply add a new record to the table.
Although I must say that using the session ID would probably be a wise choice to represent the session. The best models are the ones that match the reality being modeled... and there is nothing better to represent a session than the session id. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 22 September 2004 : 15:59:13
|
killed two birds with one stone and decided to add a yes/no field to indicate that the basket has been paid for. Sorted. Thanks guys. |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
 |
|
|
Topic  |
|