hey,
im wondering what is the best way to go about creating queries...
my program.. i am creating a staff search program, i have craeted my databse and have included queries in access. but imnot sure how to call them in vb.net wondering if anyone can help me on that...
the alternative is i have made a query in vb.net
select Forname, surename, role, telephone, department
from Employees
Where (Forename=?) AND (Surname=?)
OR
(Forname=?) and (?=")
OR
(Surname=?) and (?=")
OR
(?=") and (?=")

and then im my code i have _search results=me.employees_tableAdapter.GetDataBy(me.forenameTextBox.Text, me.SurnameTextBox.Text)
i get this error message Argument not specified for Paramter 'Surname2' of 'Public Overridable Overloads Function GetDataBy (Forename as string, surname as string, forname1 as string, surname1 as string, surname2 as string) as companydataset.employeesdatatable

does anyone know where im going wrong and how to fix it?

Recommended Answers

All 2 Replies

hi
firstly u need to creat a data adapter and a dataset and a string sql

Looks like there's no overloaded version of the GetDataBy function that takes only 2 parameters(which is what you're trying to give it).

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.