星☆空 | 对生活要知足,学习要不知足,为人处事要知不足. 卍 ♂ | ♀ 卐 - 科技以人为本.

QQ:908202921, Msn:btbtd@live.com gI.2288.oRg:88 绿色学院 - GrEeN InsTiTutE, www.btbtd.org

用户操作
[即时聊天] [发私信] [加为好友]
邱少伟ID:btbtd
404782次访问,排名124好友165人,关注者162
韬光养晦
http://www.btbtd.org/
http://gi.2288.org/
shawl.qiu,CSharp,DotNet,个人资料管理系统
btbtd的文章
原创 429 篇
翻译 3 篇
转载 16 篇
评论 370 篇
shawl.qiu的公告
www.btbtd.org
gi.2288.org
最近评论
zxc:shanghai hotel
guangzhou hotel
Gucci shoes Gucci Handbag adidas shoes
tungsten carbide thermoforming machine flexible ……
asdf:
tungsten carbide thermoforming machine flexible ……
ffff:tungsten carbidethermoforming machine flexible connectors 包装机械 印刷机械 bag making machine 包装机 jordan shoes prada shoes Gucci shoes adidas shoes nike shoes ugg boots evisu jeans true religion jeans Guc……
文章分类
收藏
相册
#蔡淳佳
#实用素材图片 1
#实用素材图片 2
#喜欢的作品
#资料截图
Aselin Debison
Avatar
Background
Blog
Concept
Diary
Doodle
Doodle 2005
Enigma
excite jp
fresh flowers
Google
Guestbook
Logo
Matter
Me
MSN
Music Cover
My Album
My Desktop
Opera
Oracle
OragTiger
PP Photo
Search
Signature
Sophie Zelmani
VMWARE
Wallpaper
wwy
wwy_baby_blue
wwy_my_room
wwy_stone_beige
Xoops
Xoops Newbb
Xoops Themes
Xoops Xphpbbi
YiMengCz I
#1. Algorithm
Bit Twiddling Hacks - By Sean Eron Anderson
Paj's Home
XySSL
高度な JavaScript 技集
0. ASP
aspfaq.com
codeproject.com
motobit.com
0. ASP.NET(C#)
ASP .NET FAQ
C# Frequently Asked Questions
C# General FAQ
C# MVP Bloggers
0. CSS
Comparison of layout engines (CSS)
0. Javascript
Comparison of layout engines (DOM)
Comparison of layout engines (ECMAScript)
crockford.com
faqts.com/javascript
Pat's Place: A technology demonstrator project.
0. SQL
Comparison of different SQL implementations
Comparison of SQL syntax
What are reserved Access, ODBC and SQL Server keywords?
What are the main differences between Access and SQL Server?
0. Tool Kits
ECMA Standards
faqts.com
Mozilla docs
RFC's
W3C TR
1. Search Engines
Alexa Web Search
All the web
AltaVista Search
AOL Web Search
Baidu
CrazySearch!
CSDN Blog Search
Excite
FeedsS's Blog
Google
Kingsoft
Lycos Search
Lyric Search
Mpeg Search
MSN Search
Search.com
SoGua
Soudu
xx-hacker
Yahoo [cn]
Yahoo [en]
Yisou
2. English Forum
#旺旺英语论坛
#英语写作论坛
Learners english club
3. Linux Forum
#三峡大学 LINUX联盟(RSS)
#中国 Linux 公社(RSS)
#黄嘴企鹅论坛(RSS)
Fedora 1.0 问题(RSS)
LINUX 1000 Q(RSS)
Linux 伊甸园(RSS)
4. PHP Forum
#中文PHP俱乐部(RSS)
#超越 PHP(RSS)
5. Other Site
#中国网络研究与搜索论坛
#在线翻译(RSS)
#常用书籍打包
#电子图书下载(RSS)
#科迈网(RSS)
#蓝色理想(RSS)
#西安信息资源网
CSDN.NET(RSS)
Google Hacker Database
Web Design Group
Webmaster world
6. Enjoy Site
#新华网论坛(RSS)
#极点视觉绘画站(RSS)
#涂鸦王国(RSS)
#牧文财经(RSS)
#猫扑大杂烩(RSS)
7. Resource
Active Perl
Apache
j2sdk-1_4_2-windows-i586
mm.mysql-2.0.4-bin.jar
mod_jk_1.2.5_2.0.47.dll
mod_rewrite
MySql
PHP
phpMailer
Source Forge Xoops
Tomcat
Web Server Resource
Win2k3
Zend
8. My Blog
#搜索引擎优化 Seo-GI
#绿色学院 - Green Institute
Blogcn(RSS)
GI Technology
GI-BB Developer Team
Green Institute
MSN Blog
Wallop Flash
Wallop HTML (RSS)
卐-_卍 信仰,理想,追求,博爱,自强,厚德.(RSS)
9. Music & Album
GaeAhit
USTC
VeryCD-MTV
A. Manual
Apache Manual
CSS Level 2 Manual
HTML 4.01 Manual
Javascript Manual
MySql Manual (cn) 2
MySql Manual (en) 1
PEAR Manual
PHP Manual
PHP-GTK Manual
Regular Expression Library
Smarty Manual
W3C Technical Reports and Publications
XHTML 1.0 Manual
XML 1.0 Manual
B. Google Cheat
Blog.com
ChinaUnix
cnblogs
donews
Google Groups
Teeta
Tom blog
Yahoo Groups
Yculblog
C. Friend's Blog
#我爱生命中存在的那一切(RSS)
#老贼在干嘛?(RSS)
#鸣乐谷
Color_Se SeSe 颜色(RSS)
Drink Drank Drunk
PLANTUNT的珍贵资源
D. SEO
Keywords 1 (Google)
Keywords 2 (Baidu)
Keywords 3 (Yisou)
Marketleap.com
Pagerank 1
Pagerank 2
Pagerank 3
Trafficzap.com
Uptimebot.com
Webconfs
E. Technology
http://bt.it.to/
http://bt.qq.to/
http://bt.zz.to/
http://du.u.to/
http://gi.dd.to/
http://gi.if.to/
http://gi.kk.to/
http://gi.pc.to
http://gi.xx.to/
http://mail.it.to/
http://nba.it.to
http://se.u.to/
F. Literature
#逐浪文学
KK 书库
G. Math/Geometry
台湾一个不错的数学站
H. Works
宝莱迪
I. SEO Link
paolid
shawl.qiu CSharp DotNet 个人资料管理系统
shawl.qiu CSharp DotNet 个人资料管理系统
shawl.qiu CSharp DotNet 个人资料管理系统
依梦卫浴-依梦洁具(北京)厂家直销店
卫浴生活坊
满意洁具馆
热弯玻璃
热熔玻璃
热熔玻璃
玻璃
玻璃制品
艺术玻璃
存档
软件项目交易
订阅我的博客
XML聚合  FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
订阅到BlogLines
订阅到Yahoo
订阅到GouGou
订阅到飞鸽
订阅到Rojo
订阅到newsgator
订阅到netvibes

原创 ASP 获取 ACCESS 中新插入数据的 ID 或多个ID /Getting last insert ID/ By Stabx收藏

新一篇: VBScript 中匹配多行, 并进行子操作的正则实例 /ASP VBScript Match Multiline/ By Stabx | 旧一篇: 最简洁的清除空行正则 - 文本软件 /RegExp/ By Stabx

标题:  ASP 获取 ACCESS 中新插入数据的 ID 或多个ID /Getting last insert ID/ By Stabx

正文:

QUOTE:

ASP 获取 ACCESS 中新插入数据的 ID 或多个ID /Getting last insert ID/ By Stabx

乍一看来, 这个问题好像很白痴, 不过要实现的话问题可多多, Access 并不像 SQL SERVER 有什么 @@ 之类的语法.

1. 获取单个 ID
2. 获取多个 ID

shawl.qiu<shawl.qiuATgmail.com>
绿色学院 | http://blog.csdn.net/btbtd/
2006-6-15

CODE:
2. 获取多个 ID
------------------------------------------------------------------
    sql = "INSERT INTO ctarticle (classid,nclassid,title,content,dateandtime,writer,email,www,url,reoff,htmloff,ubboff )  VALUES ("&cid_&","&ncid_&",'"&trim(tt_)&"','"&ct_&"','"&adt_&"','"&trim(au_)&"','"&trim(em_)&"','"&trim(www_)&"','"&trim(url_)&"',"&ro_&","&ho_&","&uo_&") " '插入数据操作
     rsData.Execute(sql)
     set rs1=rsData.Execute("select top 1 * from ctarticle order by articleid desc")
         response.write rs1("articleid")
         response.write " "
         response.write rs1("classid")
         response.write " "
         response.write rs1("nclassid")
         rs1.close : set rs1=nothing
------------------------------------------------------------------

1. 获取单个 ID
------------------------------------------------------------------
    sql = "INSERT INTO ctarticle (classid,nclassid,title,content,dateandtime,writer,email,www,url,reoff,htmloff,ubboff )  VALUES ("&cid_&","&ncid_&",'"&trim(tt_)&"','"&ct_&"','"&adt_&"','"&trim(au_)&"','"&trim(em_)&"','"&trim(www_)&"','"&trim(url_)&"',"&ro_&","&ho_&","&uo_&") " '插入数据操作
     rsData.Execute(sql)
     set rs1=rsData.Execute("select max(articleid) from ctarticle")
         response.write rs1(0)
         rs1.close : set rs1=nothing
------------------------------------------------------------------

 

 

发表于 @ 2006年06月15日 14:51:00|评论(loading...)|编辑

新一篇: VBScript 中匹配多行, 并进行子操作的正则实例 /ASP VBScript Match Multiline/ By Stabx | 旧一篇: 最简洁的清除空行正则 - 文本软件 /RegExp/ By Stabx

评论

#FAFAFA 发表于2008-05-25 22:17:57  IP: 116.242.75.*
这种方法可行吗???如果其他人在同时也插入了新数据,取到的到底是谁的啊?
发表评论  


登录
Csdn Blog version 3.1a
Copyright © shawl.qiu