Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all, i'm currently coding a project in VS.NET 2002 ... It is a web application and involves some DB queries.

 

The error i have is this :

"Compiler Error Message: BC30456: 'getReportYear' is not a member of 'TaServiceRpt.localhost7.TaEditGetReportId'. "

 

however, i've already defined 'getReportYear' as a <WebMethod()> Public Function in the TaEditGetReportId.asmx.vb page.

 

Can anyone help me out here ?

 

Cheers!

  • Administrators
Posted

Have you recently added this webmethod to the service? If so you may need to refresh the client proxy for the web service:

Under solution explorer, web references - right click on the web reference in question and select update, then try a rebuild.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Hi I've got another problem ...

 

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IndexOutOfRangeException: inYearRT at System.Data.Common.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.OleDb.OleDbDataReader.GetOrdinal(String name) at System.Data.OleDb.OleDbDataReader.get_Item(String name) at TaServiceRpt.TaEditGetReportId.getReportYear(String UserName) in D:\Inetpub\wwwroot\...\TaEditGetReportId.asmx.vb:line 263

 

can anybody make any sense outta this ? I think its related to my SQL statement, but i cant seem to be able to find out what's wrong ... Can anyone enlighten me ? Thanks !

Posted

Here here's the Public Function, in the .asmx page, the one that i'm trying to call ... The statement might be wrong, as i hvn't been able to view the results but i think it should more or less be correct ...

 

 

<WebMethod()> Public Function getReportYear(ByVal UserName As String) As _ArrayList

Dim conn As New OleDbConnection(ConfigurationSettings.AppSettings("ConnectionString"))

Dim dtrReader As OleDbDataReader

Dim cmdGetReportYear As OleDbCommand

Dim strSql As String

Dim arrReportYear As New ArrayList()

 

strSql = "SELECT intYearRT FROM tblReportRT " & _

"WHERE strReportByRT ='" & UserName & "' AND strStatusRT = 'Submit'"

'"ORDER BY intYearRT "

 

cmdGetReportYear = New OleDbCommand(strSql, conn)

conn.Open()

dtrReader = cmdGetReportYear.ExecuteReader

While dtrReader.Read

arrReportYear.Add(dtrReader("inYearRT"))

End While

conn.Close()

dtrReader.Close()

 

Return arrReportYear

 

End Function

 

and here's the table definition ( tblReportRT )... its an MS Access DB and the Primary Key is intReportIdRT ...

 

intReportIdRt ( AutoNumber), strReportByRT ( Text ), strSchoolNameRT( Text ),

strVerifiedRT(Text), strActionRT(Text), strOutStandingRT(Memo), strDateRT(Text),

intWeek(Number), intMonthRT(Number), intSchLevelRT(Number),

strStatusRT(Text), intYearRT(Number) ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...