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

Discussion in 'ASP .Net' started by Meir Rotfleisch, Nov 14, 2003.

  1. 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, Nov 14, 2003
    #1
    1. Advertising

  2. Meir Rotfleisch

    Rocky Moore Guest

    "Meir Rotfleisch" <> wrote in message
    news:...
    > 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?

    --
    Rocky Moore
    www.GotTheAnswerToSpam.com
    www.HintsAndTips.com - Soon to Launch
     
    Rocky Moore, Nov 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vikas Yadav
    Replies:
    0
    Views:
    1,141
    Vikas Yadav
    Sep 9, 2003
  2. =?Utf-8?B?UGhpbA==?=

    Faster access to MDB? MS Access MDB and ASP

    =?Utf-8?B?UGhpbA==?=, Jan 26, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    484
    Kevin Spencer
    Jan 27, 2005
  3. Gonzalo Moreno
    Replies:
    2
    Views:
    12,468
  4. John  Schult

    MDB to MDB Event Notification

    John Schult, May 4, 2005, in forum: Java
    Replies:
    0
    Views:
    486
    John Schult
    May 4, 2005
  5. Sam Roberts
    Replies:
    16
    Views:
    395
    Daniel Berger
    Feb 18, 2005
Loading...

Share This Page