Click here to Skip to main content
15,913,610 members
Home / Discussions / Database
   

Database

 
QuestionHow trace that where the connection is open Pin
hi_arv13-Jun-06 20:52
hi_arv13-Jun-06 20:52 
QuestionGetting data from a grid to a dataset to save [modified] Pin
IMC200613-Jun-06 15:39
IMC200613-Jun-06 15:39 
AnswerRe: Getting data from a grid to a dataset to save Pin
Colin Angus Mackay13-Jun-06 20:20
Colin Angus Mackay13-Jun-06 20:20 
GeneralRe: Getting data from a grid to a dataset to save Pin
IMC200614-Jun-06 7:32
IMC200614-Jun-06 7:32 
Questiondeploy database on multiple computers Pin
schilled13-Jun-06 4:08
schilled13-Jun-06 4:08 
QuestionSQLServer problem! Pin
andrei_dalcu13-Jun-06 0:27
andrei_dalcu13-Jun-06 0:27 
AnswerRe: SQLServer problem! Pin
Jim Conigliaro13-Jun-06 1:46
Jim Conigliaro13-Jun-06 1:46 
GeneralRe: SQLServer problem! Pin
andrei_dalcu13-Jun-06 1:48
andrei_dalcu13-Jun-06 1:48 
GeneralRe: SQLServer problem! Pin
Jim Conigliaro13-Jun-06 3:37
Jim Conigliaro13-Jun-06 3:37 
Questionsqlserver prob Pin
vivek-g12-Jun-06 21:07
vivek-g12-Jun-06 21:07 
AnswerRe: sqlserver prob Pin
Colin Angus Mackay12-Jun-06 23:38
Colin Angus Mackay12-Jun-06 23:38 
Question50 Tables(Urgent) Pin
kirthikirthi12-Jun-06 20:04
kirthikirthi12-Jun-06 20:04 
AnswerRe: 50 Tables(Urgent) Pin
Michael P Butler12-Jun-06 21:06
Michael P Butler12-Jun-06 21:06 
AnswerRe: 50 Tables(Urgent) Pin
r.stropek12-Jun-06 21:21
r.stropek12-Jun-06 21:21 
GeneralRe: 50 Tables(Urgent) Pin
kirthikirthi12-Jun-06 22:07
kirthikirthi12-Jun-06 22:07 
GeneralRe: 50 Tables(Urgent) Pin
r.stropek12-Jun-06 22:25
r.stropek12-Jun-06 22:25 
GeneralRe: 50 Tables(Urgent) Pin
Mahesh Sapre14-Jun-06 1:43
Mahesh Sapre14-Jun-06 1:43 
QuestionWhy I am getting the error message Server: Msg 245 Pin
kalyan_vb12-Jun-06 10:27
kalyan_vb12-Jun-06 10:27 
AnswerRe: Why I am getting the error message Server: Msg 245 Pin
Colin Angus Mackay12-Jun-06 11:44
Colin Angus Mackay12-Jun-06 11:44 
GeneralRe: Why I am getting the error message Server: Msg 245 [modified] Pin
kalyan_vb12-Jun-06 12:26
kalyan_vb12-Jun-06 12:26 
AnswerRe: Why I am getting the error message Server: Msg 245 Pin
Colin Angus Mackay12-Jun-06 12:45
Colin Angus Mackay12-Jun-06 12:45 
AnswerRe: Why I am getting the error message Server: Msg 245 Pin
r.stropek12-Jun-06 21:28
r.stropek12-Jun-06 21:28 
Hi!

Sorry, I don't think that your query will work. You cannot insert into a table variable from inside a dynamic query. Try the following:

declare @test table ( MyId int )
insert into @test values (5)

declare @stmt varchar(128)
set @stmt = 'insert into @test values (6)'
exec( @stmt )


The dynamically executed statment will not work because it does not know about the table var @test.

Additionally I saw that you forgot the ( ) in your exec-statement. exec @querystring cannot execute a dynamic query; you have to write exec ( @querystring ). Otherwise SQL Server will think you want to execute a stored procedure with the name stored in @querystring. See Transact-SQL-Reference for EXECUTE in Books Online for details.

Regards,
Rainer.


Rainer Stropek
Visit my blog at http://www.cubido.at/rainers
Questionrequired help for sql query Pin
kalyan_vb12-Jun-06 5:25
kalyan_vb12-Jun-06 5:25 
AnswerRe: required help for sql query Pin
Eric Dahlvang12-Jun-06 7:41
Eric Dahlvang12-Jun-06 7:41 
AnswerRe: required help for sql query Pin
r.stropek13-Jun-06 4:09
r.stropek13-Jun-06 4:09 

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.