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

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
 
R

Rocky Moore

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?
 

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top