Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 3 of 3
Search took 0.00 seconds.
Search: Posts Made By: Old Pedant
Forum: BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 November 30th, 2010, 02:26 PM
Replies: 6
Views: 1,437
Posted By Old Pedant
@@IDENTITY *only* exists *INSIDE* of SQL Server. ...

@@IDENTITY *only* exists *INSIDE* of SQL Server. It does not exist the VB.NET or C# or even ADO.NET world.

You need to read the manual on how to use ExecuteScalar.

Briefly:

intLoanID =...
Forum: BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 November 29th, 2010, 05:26 PM
Replies: 6
Views: 1,437
Posted By Old Pedant
Ummm....you didn't say you were using a Stored...

Ummm....you didn't say you were using a Stored Procedure in your first post.

I took your code to mean you were just using an ad hoc query to do that INSERT.

If you are using a SP, you can do...
Forum: BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 November 26th, 2010, 05:30 PM
Replies: 6
Views: 1,437
Posted By Old Pedant
DO *NOT* DO THIS!!!! Let SQL Server...

DO *NOT* DO THIS!!!!

Let SQL Server generate LoanID for you.

All you have to do is make a *SEPARATE* QUERY that simply does "SELECT @@IDENTITY" to get the value.

BUT! But you must do so...
Showing results 1 to 3 of 3

 


All times are GMT -4. The time now is 02:19 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.