Last post Mar 01, 2017 05:30 PM by PatriceSc
Jan 20, 2017 02:53 PM|garfchong|LINK
Jan 20, 2017 03:44 PM|HostingASPNet|LINK
What is the error?
Jan 20, 2017 03:54 PM|garfchong|LINK
i hv no idea, the exact same webpages hosted by godaddy when uploaded to webhosting world.... the webpage that read and write access database couldnt load, and show runtime error.....
Jan 22, 2017 12:55 AM|garfchong|LINK
The following is the code that i used to test write/read ms acces database via asp.net webpage. It works in my computer, it works in goddady's host... but the same code uploaded to webhosting world.net (https://www.webhostingworld.net/),
it doesn;'t work....
Partial Class _Default
'Dim cn As ADODB.
' Dim cmd As OleDbCommand
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'cn = New ADODB.Connection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("App_Data/testing_database"))
cn = Server.CreateObject("ADODB.Connection")
'ConStr ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & add & ";Persist Security Info=False"
cn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("App_Data/testing_database"))
'cmd = New OleDbCommand()
cmd.Connection = cn
cmd.CommandText = "INSERT INTO testing (a_name, a_id) VALUES (@a_name, @a_id)"
TextBox1.Text = ""
TextBox2.Text = ""
Dim my_namelist(100), myid(100) As String
Dim counter_read As Integer
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/App_Data/testing_database.mdb"))
cmd = New OleDbCommand("SELECT * FROM testing ", cn)
Dim reader As OleDbDataReader
reader = cmd.ExecuteReader()
Do While reader.Read()
my_namelist(counter_read) = reader.GetString(1)
myid(counter_read) = reader.GetString(2)
counter_read = counter_read + 1
TextBox3.Text = "database list" & vbNewLine & vbNewLine
For a = 0 To counter_read
TextBox3.Text = TextBox3.Text & my_namelist(a) & vbTab & vbTab & myid(a) & vbNewLine
Jan 23, 2017 09:22 AM|Chris Zhao|LINK
I suggest you to contact the host provider for technical support to help you choose the best plan for your website.
Jan 25, 2017 09:43 AM|garfchong|LINK
yup, i did contact my host provider. until now, they are also unable to solve this problem...
Mar 01, 2017 05:30 PM|PatriceSc|LINK
You don't have a portal where you could access at an error log for your web site? Else you would have to report about the error detail yourself. It's easier to fix a problem when you know exactly what it is rather by reading code that could potentially raise
multiple possible issues even for a quite short snippet.
For example here :
- right from the start you are using Access files with the Microsoft.Jet.OLEDB.4.0 are you sure this is supported by your new hosting service?
- could it be that no access files is found in App_Data (you can publish a site without publishing App_Data as typically you want to do that one time only to not overwrite your db)
- it seems you are using first "testing_database" and then "testing_database.mdb"
- your code will fail if you have more 101 rows in your db