Jump to content

Problem With A Webmethod


Paci4416

Recommended Posts

Hi, I new here i hope this the right forum to ask this question.this is my webmethod:

<WebMethod> Public Function Search(aGenre as string) As DataSet ' Connection dim dbconn as new OleDbConnection _ ("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=D:\paci\project.mdb") 'Command dim dbcom as new OleDbCommand() dbcom.CommandText="SELECT * FROM FlashInfo WHERE Genre = aGenre" dbcom.Connection=dbconn' 'DataAdapter dim gameinfo as new OleDbDataAdapter(dbcom) 'DataSet dim dsnw as DataSet = new DataSet() gameinfo.Fill(dsnw) Return dsnw End Function
When i enter the value he return with a error: "No value given for one or more required parameters." "at service1.Search(String aGenre) in D:\paci\service2.asmx:line 101"When i write insted aGenre , Sport, in the CommandText the function works.But it seems that with the string thing he cant get the value.Please help. :)Thank you in avdance.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...