I'm facing the same problem. U said its due to having the wrong connect string. What the connection string you used.
my script is this. please help me. I don't have any web.config file. it would be very helpful if you give the solution.
<script runat="server">
sub OnBtnSendClicked (s As Object, e As EventArgs)
Dim strConn as string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("guestbook.mdb") & ";"
Dim MySQL as string = "INSERT INTO Guestbook (Name, EMail, URL, Comment) VALUES ('" & txtName.Text & "','" & txtEMail.Text & "','" & txtURL.Text & "','" & txtComment.Text & "')"
Dim MyConn as New OleDBConnection (strConn)
Dim cmd as New OleDBCommand (MySQL, MyConn)
MyConn.Open ()
cmd.ExecuteNonQuery ()
MyConn.Close ()
Response.Redirect ("guestlog.aspx")
end sub
sub OnBtnClearClicked (s As Object, e As EventArgs)
txtName.Text = ""
txtEMail.Text = "yourname@somebody.com"
txtURL.Text = "http://"
txtComment.Text = ""
end sub
</script>
salman_1
Member
2 Points
1 Post
Re: Web Config <customErrors mode="Off"/>
Oct 09, 2008 04:50 PM|LINK
I'm facing the same problem. U said its due to having the wrong connect string. What the connection string you used.
my script is this. please help me. I don't have any web.config file. it would be very helpful if you give the solution.
<script runat="server">
sub OnBtnSendClicked (s As Object, e As EventArgs)
Dim strConn as string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("guestbook.mdb") & ";"
Dim MySQL as string = "INSERT INTO Guestbook (Name, EMail, URL, Comment) VALUES ('" & txtName.Text & "','" & txtEMail.Text & "','" & txtURL.Text & "','" & txtComment.Text & "')"
Dim MyConn as New OleDBConnection (strConn)
Dim cmd as New OleDBCommand (MySQL, MyConn)
MyConn.Open ()
cmd.ExecuteNonQuery ()
MyConn.Close ()
Response.Redirect ("guestlog.aspx")
end sub
sub OnBtnClearClicked (s As Object, e As EventArgs)
txtName.Text = ""
txtEMail.Text = "yourname@somebody.com"
txtURL.Text = "http://"
txtComment.Text = ""
end sub
</script>