Webservice and MDB Recordset HELP Loosing Sleep Over this One !!!

  • Thread starter Thread starter Meir Rotfleisch
  • Start date Start date
M

Meir Rotfleisch

Hi

I am attempting to create a webservice to that would return a Recordset from
the MDB. All attempts get me Server Error 500. The code is below..

Hope someone can explain to me what I am doing wrong.. It must be something
small and annoying.. LOL..

<WebMethod()> Public Function getchavilaRiders(ByVal ChNum2 As Double) As
DataSet

Dim mylist As DataColumn

Dim x As String

Dim y As String

y = Me.Server.MapPath("\db\tarifonweb.mdb")

x = oledb2 + y

Dim cn As New System.Data.OleDb.OleDbConnection(x)

cn.Open()

Dim daRiderPicked As New System.Data.OleDb.OleDbDataAdapter("SELECT
Policymain,Pnum,PName FROM FullRider0", cn)

daRiderPicked.Fill(DB1, "fullrider0")

getchavilaRiders = DB1

End Function


Thanks for the help
Meir
 
Meir Rotfleisch said:
Hi

I am attempting to create a webservice to that would return a Recordset from
the MDB. All attempts get me Server Error 500. The code is below..

Hope someone can explain to me what I am doing wrong.. It must be something
small and annoying.. LOL..

<WebMethod()> Public Function getchavilaRiders(ByVal ChNum2 As Double) As
DataSet

Dim mylist As DataColumn

Dim x As String

Dim y As String

y = Me.Server.MapPath("\db\tarifonweb.mdb")

x = oledb2 + y

Dim cn As New System.Data.OleDb.OleDbConnection(x)

cn.Open()

Dim daRiderPicked As New System.Data.OleDb.OleDbDataAdapter("SELECT
Policymain,Pnum,PName FROM FullRider0", cn)

daRiderPicked.Fill(DB1, "fullrider0")

getchavilaRiders = DB1

End Function


Thanks for the help
Meir

You might try turning of the friendly error messages in IE so that you can
see the actual error.

Are you sure the folder the mdb file in is allowed full write access for the
ASP.NET account?
 
Back
Top