Public Function getSelc()
            Dim com As New SqlCommand
            Sqlcon.Close()
            Sqlcon.Open()
            Try


                com = New SqlCommand("EXECUTE regionSelect '" & txtID.EditValue & "','" & txtRegion.EditValue & "','" & _ txtShortN.EditValue & "','" & txtStatus.EditValue & "'", Sqlcon)

               objDA.SelectCommand = com
               objDA.Fill(objDSs)                         '=> could not find stored procedure ( 'but I have it with the same name in my database ) 

               GridControl1.DataSource = objDS.Tables(0)  'this is my goal

               objDA.Dispose()
               com.Dispose()

               Sqlcon.Close()
               MessageBox.Show("The selected data set")

            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try

        End Function

Edited 2 Years Ago by kdejan87: Mistake

Hi, first of all, put some description at your post, don't just drop the code.

So the problem seems to be that you can execute the stored procedure, right? Do you have permission to do so with the account your are logged in? Who is the owner of the SP? Try using the fully classified name like 'dbo.regionSelect'.

Okay. Thanks for the advice. The problem created because I had a connection but to the wrong base. I have another question. Is it possible to somehow fill the dataset and transmit to the datagrid, but only columns without data.But not using dataset1.tables (0). clear or similar. SO, only transmit columns without data. For example use code that i drop

Sorry mate, I really didn't understand what you want.
You want to fill an datagrid only with columns without data? What's the point? The datagrid would be empty.

This question has already been answered. Start a new discussion instead.