HighDots Forums  

Retrieve ID with VB

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Retrieve ID with VB in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alejandro
 
Posts: n/a

Default Retrieve ID with VB - 08-22-2006 , 03:41 PM






I have the following code to retrieve the ID once a record is inserted with
the 'insert behaivor' in DW, this is Javascript, but the page where I need
to add it is VB so it doesnt work, perhaps someone can help get this in VB ?

// execute the insert
var MM_editCmd = Server.CreateObject('ADODB.Command');
MM_editCmd.ActiveConnection = MM_editConnection;
MM_editCmd.CommandText = MM_editQuery;
MM_editCmd.Execute();

------ This is where the code goes ---------

<!--set up Auto Number retrieval for SQL Server -->
var rsNewAutoIncrement = MM_editCmd.ActiveConnection.Execute("select
@@identity")
Session("svReq_ID") = rsNewAutoIncrement(0).Value
<!--rsNewAutoIncrement.Close -->
<!--var rsNewAutoIncrement = Nothing -->
<!--end retrieval -->


------------

Any help is greately appreciated !

A



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.