On Sat, 15 Oct 2005 20:19:21 GMT, "Ian Davies" <ia********@vir gin.net> wrote:
in <dv************ ****@newsfe7-gui.ntli.net>
Hello
My host does not allow external connections to my MySQL database on their
server from a remote computer. I would like users of my VB application to be
able to add records from a table on said database to their local MySQL
database. Can anyone advise me of my options to solve this one (appart from
changing host)?
Thanks
Ian
Create an ASP that queries the database and saves the recordset to the response
object. This method assumes the information is encrypted in the db if it's
sensitive.
ASP:
<%Option Explicit%>
<!--#include file="inc/asp_head.asp" -->
<!--#include file="inc/asp_connect.asp " -->
<%Dim rs: Set rs = cn.Execute("get _OnlineEntries " &
LikePhrase(Vali dateInputString (Request.QueryS tring("ShowTitl e"),"")) & "," &
LikePhrase(Vali dateInputString (Request.QueryS tring("ShowDate s"),"")))
rs.Save Response: rs.Close: Set rs = Nothing: cn.Close: Set cn = Nothing%>
VB app:
Public Function GetOnlineEntrie s(ByRef sURL As String) As Variant
Dim rs As ADODB.Recordset : Set rs = New ADODB.Recordset : rs.Open sURL
If (Not rs.EOF) Then GetOnlineEntrie s = rs.GetRows: If (Not rs Is Nothing)
Then rs.Close
End Function
mURL = "http://" & frmMain.IP_Main & "/getonlineentrie s.asp?ShowTitle =" &
URLEncode(frmMa in.ShowTitle) & "&ShowDates =" & URLEncode(frmMa in.ShowDates)
Dim moe: moe = GetOnlineEntrie s(mURL)
mbOnlineEntries = IsArray(moe)
---
Stefan Berglund