Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ticatac
Starting Member
6 Posts |
Posted - 2002-11-20 : 09:57:43
|
HII'm trying to use the shape command to call a MS SQL Server 2k stored procedure but all I keep getting is the error message 'Incorrect syntax near the keyword 'EXEC''. This is the code I'm using:.Command text = "SHAPE ({Call dbo.spStoredProcedure}) BY Registration".ExecuteI get the error as soon as it hits the Execute command.Any help greatly appreciated |
|
Robwhittaker
Yak Posting Veteran
85 Posts |
Posted - 2002-11-20 : 11:22:20
|
I don't really understand what you are trying to do here, but anyway if you read BOL the shape command uses Curly brackets and not normal ones so try .Command text = "SHAPE {{Call dbo.spStoredProcedure}} BY Registration" .Execute I still think you'll get syntax error, just a different one. You should try out your sql in query analyser first and getting working there before putting it in to your VB. You would have found that the sql you posted was wrong in query analyser.Rob |
 |
|
ticatac
Starting Member
6 Posts |
Posted - 2002-11-21 : 04:38:42
|
I realised about the curly bracketts not long after I posted but that wasn't the problem. I hadn't used the correct connection string which was causing this error. |
 |
|
|
|
|