由买买提看人间百态

topics

全部话题 - 话题: autonumber
(共0页)
L********y
发帖数: 20
1
来自主题: Database版 - 请教Access里的AutoNumber
1。AutoNumber总是从1开始,可不可以设成让它从某个数开始,比如从10000开始。
2。有没有可能在AutoNumber前加一字母,比如S10000开始,而且每个record自动加1。
a***h
发帖数: 29
2
there is a field for ID, but such ID is not an
autonumber(it is not an auto-increase number).
z****g
发帖数: 2497
3
I use SQL "Insert" to fill data into an Access *.mdb file.
And in the field "CompID", I set it as AutoNumber,
it should fill itself automatic when you fill in data in
database.
But it doesn't work when use Insert. It need me to put a
value to that field too. So, it is not automatic.
How to solve this problem?
Thanks for help!
a*****a
发帖数: 438
4
i just tried and it worked..
I created a table CompCEO with two columns, 'CompID'
(autonumber) and 'CEOName'(text).
then I inserted two records by:
INSERT INTO CompCEO VALUES (1, "amnesia")
INSERT INTO CompCEO (CEOName) VALUES ("amnesia")
SELECT * FROM CompCEO
everything works.
h*****l
发帖数: 184
5
来自主题: Database版 - 请教Access里的AutoNumber
Agree! You can use something like append. need two tables to work around it.

2。有没有可能在AutoNumber前加一字母,比如S10000开始,而且每个record自动加1。
x****a
发帖数: 6
6
I have two forms in a database. I use the first form to fill up
a table and save the autonumber of this table's primary key into
a globle variable.
The problem is when I use the second form to fill up other tables.
This automunber is a need. But this autonumber is always 0. It's original
value is disappeared.
Who knows why? Many thanks!
g***o
发帖数: 297
7
来自主题: Database版 - help! Access database question
you could set this column to autonumber.
bt you have to be very carefully when you insert the value
into table since autonumber is not reusable.
m**********m
发帖数: 92
8
来自主题: Database版 - CO-ASK Re: 请教个sql query问题: sql7
If you are using autonumber in Access or identity in MS SQL Server, then it
works this way. Nothing was wrong. The number is not reset when you delete
records. To reset the autonumber to a certain value, you need to use
DBCC CHECKIDENT to reseed the column at certain value
in sql server 7. Please google its usage and examples.
s**********d
发帖数: 36899
9
来自主题: Living版 - 急问:见过这样的厨房吗??

http://www.ajmadison.com/phpdocs/ajtest/item_image_browser.php?
sku=JES9900BAS&AutoNumber=31198
两千多。
a***h
发帖数: 29
10
there is a field for ID, but such ID is not an
autonumber(it is not an auto-increase number).
s***l
发帖数: 9
11

I am not clear to ACCESS. But in SQL SERVER 7.0, you can
simply omit the field when inserting new values.
h****r
发帖数: 2056
12
It works. hahha
the problem is very funny.
cause I set autonumber for my table records, and later i deleted the first
five records, so the autonumbre begins from 6, that is why i cannot get the
value shown up. because my option value passed to asp begins from 1 to 3.
whatever. thanks all.
btw, why do I always make this kind of stupic mistake. too careless.
在 huster (huster) 的大作中提到: 】
c**t
发帖数: 2744
13
来自主题: Database版 - 请教Access里的AutoNumber
Oracle, SQL Server 都可以, Access不行
g***o
发帖数: 297
14
来自主题: Database版 - 请教Access里的AutoNumber
of course you can.
You can find exact solution from ACCESS help. There is a stp-by-step
instruction.
B*****g
发帖数: 34098
15
来自主题: Database版 - small problem about DAO
想了想,还是再建个table吧。
Table4
Table4 has ID, Year, STATES, Event, STATES_MIX
(ID is autonumber)
INSERT INTO Table4 (Year, Event, STATES_MIX)
SELECT Year, Event(1-10), STATE(1-7)
WHERE Event(1-10) is not null
AND STATE(1-7) is not null
***70个insert
Option: delete the dup records in table4
Table4 create index on state_mix
UPDATE table4 t4 inner join table3 t3 on t4.state_mix = t3.Statecode set t4.
state = t3.state.
UPDATE table4 t4 inner join table3 t3 on t4.state_mix = t3.State set t4.stat
e = t3.s
B*****g
发帖数: 34098
16
最好在access里加autonumber column, 然后reload数据到sql server,然后3
B*****g
发帖数: 34098
17
来自主题: Database版 - 今天还没写东西
SQL server要搞sequence,oracle应该加AUTONUMBER,haha。不愿费事建seq的懒人就
有福音了。
(共0页)