Click here to Skip to main content
15,912,578 members
Home / Discussions / Database
   

Database

 
GeneralRe: Accessing SQL Database/Table/etc. Definitions Pin
matthias s.2-Sep-04 1:56
matthias s.2-Sep-04 1:56 
GeneralRe: Accessing SQL Database/Table/etc. Definitions Pin
Colin Angus Mackay2-Sep-04 2:05
Colin Angus Mackay2-Sep-04 2:05 
GeneralRe: Accessing SQL Database/Table/etc. Definitions Pin
matthias s.2-Sep-04 7:30
matthias s.2-Sep-04 7:30 
GeneralRe: Accessing SQL Database/Table/etc. Definitions Pin
Colin Angus Mackay2-Sep-04 12:26
Colin Angus Mackay2-Sep-04 12:26 
GeneralRe: Accessing SQL Database/Table/etc. Definitions Pin
Duncan Edwards Jones2-Sep-04 11:24
professionalDuncan Edwards Jones2-Sep-04 11:24 
Generalsql statement Pin
Sudee1-Sep-04 21:58
Sudee1-Sep-04 21:58 
GeneralRe: sql statement Pin
Anonymous2-Sep-04 0:46
Anonymous2-Sep-04 0:46 
GeneralRe: sql statement Pin
Jon Hulatt2-Sep-04 0:50
Jon Hulatt2-Sep-04 0:50 
Yes, plenty.

1. It's pointless. All you're doing is printing a string. Why not just generate the string at the caller?

2. variable @sql is not needed. you could just "print 'insert into ... "

3. It won't work. You need to CONVERT(varchar(10),@intid) before you can use it as a varchar.

4. You're mixing nvarchar and varchar. and implicitly casting nvarchar to varchar, thus negating the whole point of using nvarchar in the first place.

5. I think hungarian notation in a database is evil.

6. The main point of stored procedures is that they're compiled and hence more efficient. You're not leveraging that efficiency at all here.

jon

#include <beer.h>

GeneralSQL Server Extended Stored Procedures Pin
Anil Kumar Saharan1-Sep-04 11:53
Anil Kumar Saharan1-Sep-04 11:53 
GeneralMulti threaded ADO Pin
snodgrass1-Sep-04 4:28
snodgrass1-Sep-04 4:28 
Questiontrigger problem? Pin
sumank31-Aug-04 19:59
sumank31-Aug-04 19:59 
GeneralADO.net - Data source doesn't recognise my dataset Pin
savagerx31-Aug-04 6:53
savagerx31-Aug-04 6:53 
GeneralRe: ADO.net - Data source doesn't recognise my dataset Pin
Rocky Moore31-Aug-04 20:05
Rocky Moore31-Aug-04 20:05 
GeneralStored Proc not returning my Output Pin
matthias s.31-Aug-04 3:51
matthias s.31-Aug-04 3:51 
GeneralRe: Stored Proc not returning my Output Pin
Michael P Butler31-Aug-04 4:45
Michael P Butler31-Aug-04 4:45 
GeneralRe: Stored Proc not returning my Output Pin
matthias s.31-Aug-04 4:55
matthias s.31-Aug-04 4:55 
GeneralRe: Stored Proc not returning my Output Pin
Michael P Butler31-Aug-04 5:07
Michael P Butler31-Aug-04 5:07 
GeneralRe: Stored Proc not returning my Output Pin
bnieland31-Aug-04 5:00
bnieland31-Aug-04 5:00 
GeneralSolution found! Pin
matthias s.31-Aug-04 5:19
matthias s.31-Aug-04 5:19 
GeneralTrace automation Pin
Deb22230-Aug-04 11:43
Deb22230-Aug-04 11:43 
GeneralDeriving from DataTable and adding rows in a different thread while displaying the table in a DataGrid. Pin
Michael Hulthin30-Aug-04 5:37
Michael Hulthin30-Aug-04 5:37 
GeneralSQL question Pin
NewPureLand28-Aug-04 18:00
NewPureLand28-Aug-04 18:00 
GeneralRe: SQL question Pin
NewPureLand28-Aug-04 19:38
NewPureLand28-Aug-04 19:38 
GeneralRe: SQL question Pin
Colin Angus Mackay28-Aug-04 22:55
Colin Angus Mackay28-Aug-04 22:55 
GeneralRe: SQL question Pin
mike.hall@lehigh.edu30-Aug-04 2:46
mike.hall@lehigh.edu30-Aug-04 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.