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
kdejan87
0
Newbie Poster
Recommended Answers
Jump to PostHi, 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? …
Jump to PostOk, that's great, but you didn't mark it yet, please do so =)
All 5 Replies
AleMonteiro
238
Can I pick my title?
kdejan87
0
Newbie Poster
AleMonteiro
238
Can I pick my title?
kdejan87
0
Newbie Poster
AleMonteiro
238
Can I pick my title?
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.