Showing posts with label xxxxx. Show all posts
Showing posts with label xxxxx. Show all posts

Sunday, February 19, 2012

error stored procedure parameters

Hi i'll get the following error

The SqlParameter with ParameterName 'xxxxx' is already contained by another SqlParameterCollection.

I'am trying to create an dataset in which data of the different connectionpoints are separated into different tables. Herefor i'm using an stored procedure.

Below you'll find part of the main function and the full function which will execute the stored procedure.

kind regards

main function

Dim Parameters As SqlParameter() = { _
New SqlParameter("@.ConnectionPointID", SqlDbType.NVarChar, 255)}

For x = 0 To myds.Tables("ConnectionPoints").Rows.Count - 1
connectionpointID = myds.Tables("connectionpoints").Rows(x).Item("Eancode")
Parameters(0).Value = connectionpointID
mydb.doStoredProcedure("SP_EDS_Dyomes_XML", Parameters,connectionpointID.ToString, myds)
Next

Public Overloads Function doStoredProcedure( _
ByRef Mycommand As SqlCommand, _
ByRef myds As DataSet, _
ByVal Table As String)

Dim myda As New SqlDataAdapter

Mycommand.CommandTimeout = 180
If Mycommand.Connection Is Nothing Then
Dim mydb As New Database
Mycommand.Connection = mydb.generateconnection
End If
If Mycommand.Connection.State = ConnectionState.Closed Then
Mycommand.Connection.Open()
End If
CheckParameters(Mycommand)
myda.SelectCommand = Mycommand

Try
myda.Fill(myds, Table)
Catch ex As Exception
Debug.Write(ex.Message)
End Try
myda.Dispose()
Mycommand.Dispose()

End FunctionMycommand.Dispose() will release the parameter you created, and make Parameters(0) nothing|||thanx|||No problem. Hope it works for you.

Friday, February 17, 2012

ERROR sql2005 sobre win2000 ad server

hi
when i try to save a maintenance plan
i get an error like
"GUID must have 32 characters y 4 hyphens"
"xxxxxx-xxxxx-...-xxxxx"
this occurs in production
( sql2005 over win 2000 advanced server )
but, on dev environment
( over win 2003 server )
works fine
any idea ?
thanks
--
atte,
Hernánbajopalabra wrote:
> hi
> when i try to save a maintenance plan
> i get an error like
> "GUID must have 32 characters y 4 hyphens"
> "xxxxxx-xxxxx-...-xxxxx"
> this occurs in production
> ( sql2005 over win 2000 advanced server )
> but, on dev environment
> ( over win 2003 server )
> works fine
> any idea ?
> thanks
>
That sounds like a custom message coming from a trigger. Are there
triggers on that table in production that aren't in development?|||no triggers
this is the real error
"GUID should contain 32 digits with 4 dashes"
when trying to save the more easy simple plan
it seems to be a bug
both sql servers reports
different MDAC versions and files ...
could it be the point ' the MDAC '
atte,
Hernán
"Tracy McKibben" <tracy@.realsqlguy.com> escribió en el mensaje
news:ucm2uMVlGHA.5044@.TK2MSFTNGP02.phx.gbl...
| bajopalabra wrote:
| > hi
| > when i try to save a maintenance plan
| > i get an error like
| >
| > "GUID must have 32 characters y 4 hyphens"
| > "xxxxxx-xxxxx-...-xxxxx"
| >
| > this occurs in production
| > ( sql2005 over win 2000 advanced server )
| >
| > but, on dev environment
| > ( over win 2003 server )
| > works fine
| >
| > any idea ?
| > thanks
| >
|
| That sounds like a custom message coming from a trigger. Are there
| triggers on that table in production that aren't in development?|||bajopalabra wrote:
> no triggers
> this is the real error
> "GUID should contain 32 digits with 4 dashes"
> when trying to save the more easy simple plan
> it seems to be a bug
> both sql servers reports
> different MDAC versions and files ...
> could it be the point ' the MDAC '
>
Apparently this is a known bug that is fixed in Service Pack 1
http://support.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.tools&tid=ea561347-3d88-41c2-b475-88bfd478c3ce&p=1|||i think it's fixed on win2003
but not on win2000
i tested in both servers
i found a workareound
as i read on another newsgroup
if i create the plan via wizard
there are no problem
later, i can change the plan as i wish
very rare thing...
atte,
Hernán
"Tracy McKibben" <tracy@.realsqlguy.com> escribió en el mensaje
news:uJc89oVlGHA.3776@.TK2MSFTNGP03.phx.gbl...
| bajopalabra wrote:
| > no triggers
| > this is the real error
| >
| > "GUID should contain 32 digits with 4 dashes"
| >
| > when trying to save the more easy simple plan
| >
| > it seems to be a bug
| >
| > both sql servers reports
| > different MDAC versions and files ...
| > could it be the point ' the MDAC '
| >
| >
|
| Apparently this is a known bug that is fixed in Service Pack 1
|
http://support.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.tools&tid=ea561347-3d88-41c2-b475-88bfd478c3ce&p=1
|