473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

current record number

ven
hello

i want to get current record in MS SQL table with identity column, let say i
put somethin using INSERT INTO and then i want to know current number in
identity column
how can i put this number into variable in vbscript ?

Ven
Nov 18 '05 #1
6 1543
SELECT SCOPE_IDENTITY

this must be executed in the same batch as your insert statement
--
Abdellah Elamiri
..net Developer
Efficacy through simplicity
"ven" <ve*****@poczta.onet.pl> wrote in message
news:cd**********@news.onet.pl...
hello

i want to get current record in MS SQL table with identity column, let say i put somethin using INSERT INTO and then i want to know current number in
identity column
how can i put this number into variable in vbscript ?

Ven

Nov 18 '05 #2
select @@identity

"ven" <ve*****@poczta.onet.pl> wrote in message
news:cd**********@news.onet.pl...
hello

i want to get current record in MS SQL table with identity column, let say
i
put somethin using INSERT INTO and then i want to know current number in
identity column
how can i put this number into variable in vbscript ?

Ven

Nov 18 '05 #3
"ven" <ve*****@poczta.onet.pl> wrote in news:cd**********@news.onet.pl:
hello

i want to get current record in MS SQL table with identity column, let
say i put somethin using INSERT INTO and then i want to know current
number in identity column

SELECT @@IDENTITY.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #4
ven

Użytkownik "A. Elamiri" <abdellahDOTelamiriATclintonDOTedutNOSPAM> napisał w
wiadomości news:e8**************@tk2msftngp13.phx.gbl...
SELECT SCOPE_IDENTITY

this must be executed in the same batch as your insert statement
--
Abdellah Elamiri
.net Developer


but how write this value to vbscript variable ?

Nov 18 '05 #5
"ven" <ve*****@poczta.onet.pl> wrote in news:cd**********@news.onet.pl:
but how write this value to vbscript variable ?


Does your .NET app have a COM interface? If it does, then you can call the
app via COM+ and access the variable as a property or function.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #6
ven

Użytkownik "Lucas Tam" <RE********@rogers.com> napisał w wiadomości
news:Xn***************************@140.99.99.130.. .
"ven" <ve*****@poczta.onet.pl> wrote in news:cd**********@news.onet.pl:
but how write this value to vbscript variable ?


Does your .NET app have a COM interface? If it does, then you can call the
app via COM+ and access the variable as a property or function.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

that`s ok, but maybe can you put a little code ?

Thank`s

Ven
Nov 18 '05 #7

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

Similar topics

1
by: Tony | last post by:
I have a form in access that has 5 fields for a certain record: 1)Date mailed, 2)Date received, 3)Date completed 4)Foreign Content amount and 5)record number. If the foreign content (FC)is >15% of...
2
by: Ryan | last post by:
Access97 I hope someone out there can help. This is driving me crazy. Basically, I am trying to recreate VBA's built in navigation feature (The one that allows you to move first, next,...
1
by: Marco Krechting | last post by:
Hi All, I have a continuous form on which I placed an image. Under the click event I want to retrieve the current record number even when the focus is for example set to the first record. I...
3
by: hebandgene | last post by:
When I delete a record in a subform I get the warning that I'm about to delete a record, followed by an error "No current record." When I click OK obviously the record is deleted and it goes to...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: matthewemiclea | last post by:
I have a subform, where in the "on current" event, I display code that is supposed to recognize which record I am pointing to, and then display more specific info in another subform based on that...
1
by: shumaker | last post by:
The documentation for the resync method shows that it can work with a "Record" object. How do I get just the current record displayed in a form? CurrentRecord returns a long number, not an...
1
by: 4004 | last post by:
I would like to open a columnar form (so I can see all the details) from a datasheet form (so I can see what is there) but keep the same recordset and current record. I can do the recordset set...
7
by: rockdc1981 | last post by:
i have audit trail module using this code... Option Compare Database Option Explicit Public Function AuditTrail() On Error GoTo Err_Audit_Trail 'ACC2000: How to Create an Audit Trail...
2
by: Tom Clavel | last post by:
Scratching my head. I am using the filter property on a combo box .AfterUpdate event to get to a single client record. This is causing a some strange behavior: As I enter a subform, I get a no...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.