TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
steve.nihan
NA
1
0
Parameterized Query in Distributed Application (winform)
Nov 23 2003 10:31 AM
I've created the following distributed application: Solution EDSQLWSVC EDEmployerWinClient Project3 Web Service winform app asp.net web app My web services are fine....and I can get data in, out etc. My problem is this: I want to use the data adaptors in the web services for the windows client application. Only problem is...when i want to run a parameterized query in the client application...I get errors flagging the SQL Statement and the Parameterization. Big ones. SO...How do I parameterize the query? I've done it in the Data Adaptor's SQL Statement in the web service, and on the windows form, I've tried: Private Sub GetRecs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetRecs.Click Dim ws As New EDEmployerWinClient.EDEmployerService.EmpService ws.Credentials = System.Net.CredentialCache.DefaultCredentials EmpRecData.SelectCommand.Parameters("Param1").Value = Textbox1.Text EmpRecsDa1.Clear() EmpRecsDa1.Fill(EmpRecsData) EmpRecsData.Merge(ws.GetRecs()) End Sub EDEmployerService is the web reference, and EmpService is the Web Service All I want it to do is to Select only the records based on the Parameter. In my SQL Statement, I have "SELECT Tbl_One.* FROM Tbl_One WHERE Email = @Param1" This is my first time trying to parameterize a SQL Statement through web services..so I'm a bit lost. Any ideas where someone's done something similar?
Reply
Answers (
0
)
make bold of selected font
Re arrange XML Nodes