From jpf101
How can one use what the help menus call a parameterized query in a program?
What argument(s) is it looking for? I could find nothing in the help to answer this question.
If I run the few lines below with line 15 ( it begins with âimb = â¦) commented out, it runs correctly but shows textbox4 answers (as it should) as zero.
When I uncomment line 15, I get errors as shown below
Code:
Public Class Form1
Dim ima, imb, rw1, cl1 As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'CardDataSet.cardb' table. You can move, or remove it, as needed.
Me.CardbTableAdapter.Fill(Me.CardDataSet.cardb)
'TODO: This line of code loads data into the 'CardDataSet.carda' table. You can move, or remove it, as needed.
Me.CardaTableAdapter.Fill(Me.CardDataSet.carda)
rw1 = 3
cl1 = 4
ima = CardaTableAdapter.where_rw_equal_3_and_cl_equal_4
TextBox1.Text = " ima = " & ima
TextBox2.Text = " ima squared = " & ima * ima
TextBox3.Text = " rw1 = " & rw1 & " , " & " cl1 = " & cl1
imb = CardaTableAdapter.where_rw_equal_rw1_and_cl_equal_cl1
TextBox4.Text = " imb = " & imb & " ima squared = " & imb * imb
End Sub
End Class
Error 1 Argument not specified for parameter 'cl1' of 'Public Overridable Overloads Function where_rw_equal_rw1_and_cl_equal_cl1 (rw1 As Integer, cl1 As Integer) As Object'. C:\Users\John\AppData\Local\Temporary Projects\test5\Form1.
vb 15 test5
Error 2 Argument not specified for parameter 'rw1' of 'Public Overridable Overloads Function where_rw_equal_rw1_and_cl_equal_cl1 (rw1 As Integer, cl1 As Integer) As Object'. C:\Users\John\AppData\Local\Temporary Projects\test5\Form1.
vb 15 test5
The table adapter looks like this
SELECT im
FROM carda
WHERE (rw = @rw1) AND (cl = @cl1)