System.Data.OleDb.OleDbException: Internet Server Error.

Getting this error when running the website on remote webserver. It wo

Page 1 of 1

1 Replies - 1794 Views - Last Post: 04 August 2008 - 10:53 PM Rate Topic: -----

#1 ajaykal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-August 08

System.Data.OleDb.OleDbException: Internet Server Error.

Posted 04 August 2008 - 10:43 PM


Dim CON As New OleDbConnection





		CON.ConnectionString = ConnectionString
		CON.Open()


		AccessDataSource1.DataFile = Server.MapPath("/surveydb.mdb")

		mydatagrid.EditItemIndex = e.Item.ItemIndex
		intItemNo = e.Item.ItemIndex

		mydatagrid.DataSourceID = "AccessDataSource1"

		intbillno = mydatagrid.Items(e.Item.ItemIndex).Cells(3).Text






		Dim dr As OleDb.OleDbDataReader
		Dim com As OleDbCommand
		
		Dim strSQL As String

		'strSQL = "select bill_date, photoss, surveyor, survey_type , claimstatus, paystatus from bill where bill_no = " & mydatagrid.Items(e.Item.ItemIndex).Cells(3).Text

		strSQL = "select * from bill where bill_no = 1"






		com = New OleDbCommand(strSQL, CON)


		dr = com.ExecuteReader()

		If dr.Read() Then

			If IsDBNull(dr(0)) Then
				txtbilldate.Text = vbNullString
			Else
				txtbilldate.Text = dr(0)

			End If

			If IsDBNull(dr(1)) Then
				txtPhotos.Text = vbNullString
			Else
				txtPhotos.Text = dr(1)


			End If

			If IsDBNull(dr(2)) Then
				txtSurveyor.Text = vbNullString
			Else
				txtSurveyor.Text = dr(2)


			End If

			If IsDBNull(dr(3)) Then
				cboType.Text = vbNullString
			Else
				cboType.Text = dr(3)


			End If

			If IsDBNull(dr(4)) Then
				cboclaimStatus.Text = vbNullString
			Else
				cboclaimStatus.Text = dr(4)


			End If

			If IsDBNull(dr(5)) Then
				cboPaystatus.Text = vbNullString
			Else
				cboPaystatus.Text = dr(5)
			End If

		End If

		blnInsert = False



Getting the error System.Data.OleDb.OleDbException: Internet Server Error while running the site on remote webserver. On localhost it works fine.
on line dr = com.executereader()

Is This A Good Question/Topic? 0
  • +

Replies To: System.Data.OleDb.OleDbException: Internet Server Error.

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: System.Data.OleDb.OleDbException: Internet Server Error.

Posted 04 August 2008 - 10:53 PM

Is you surveydb.mdb file in the root directory of your application? If it is then you need to move it to the App_Data folder. If that folder doesn't exist then right click on the solution name and add a new ASP.NET folder named App_Data. Once you have finished this then you need to change how you're referencing the MDB file, like so:

AccessDataSource1.DataFile = Server.MapPath("~/App_Code/surveydb.mdb")


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1