sqlIDQuery = "SELECT SectionID FROM SECTIONS WHERE
(SectionID=SCOPE_IDENTITY());"
UNTIL. . . .
I added a parameter, now it fails, it doesent matter if I use the parameter
or not, when I add a param, it falls over, Any Ideas ?
I know this is not the right place to post, but I know you guys are good !!
--
Best Regards
The Inimitable Mr Newbie º¿º
Could you please post the query with the parameter in it so we can
help figure out the problem?
Ken
------------------------
--
Best Regards
The Inimitable Mr Newbie º¿º
"Ken Tucker [MVP]" <KenTuc...@discussions.microsoft.com> wrote in message
news:654F521E-D47F-40C7...@microsoft.com...
When you use sqlCommand.executenonquery you have a parameter defined
and use it.
At this line you change the command text for the sql command.
sqlCommand.CommandText = sqlIDQuery
The new command text does not have a parameter but you still have a
parameter defined. TThis causes your error. Try clearing the parameters
before you run the command the second time.
sqlCommand.Parameters.Clear()
SectionID = CType(sqlCommand.ExecuteScalar, Integer) ' ****
Ken
--------------------
"Mr Newbie" <he...@now.com> wrote in message
news:uGCalFhG...@TK2MSFTNGP14.phx.gbl...
--
Best Regards
The Inimitable Mr Newbie º¿º
"Ken Tucker [MVP]" <vb...@bellsouth.net> wrote in message
news:ONfsPqjG...@tk2msftngp13.phx.gbl...