I have a stored procedure on MySQL Server that goes something like:
Select * from phones where idphone=param1;
in vb 2005 the code is:
the connection string for the SQLDataSource is a dsn that works fine
The problem is that the gridview doesnt show anything... there is no error either..
I dont get it, in vb 2003 you had something like: cmdSelect.ExecuteNonQuery
What is the equivalent in VB 2005 ?
Select * from phones where idphone=param1;
in vb 2005 the code is:
Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
dim strLink as string ="3"
sds.SelectCommand = "SrcModel" sds is a SQLDataSource
sds.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
Dim param1 As New FormParameter("param1", TypeCode.String, strLink)
param1.Direction = Data.ParameterDirection.Input
sds.SelectParameters.Add(param1)
GridView1.DataSource = sds
GridView1.DataBind()
End Sub
the connection string for the SQLDataSource is a dsn that works fine
The problem is that the gridview doesnt show anything... there is no error either..
I dont get it, in vb 2003 you had something like: cmdSelect.ExecuteNonQuery
What is the equivalent in VB 2005 ?