marija
asked on
FileMaker Pro and ASP
Can anyone give me the syntax to connect to a FileMaker Pro database using ASP (vbscript)?
Can one even do it? I have the FM ODBC drivers and created a system DSN.
Thanks!
Can one even do it? I have the FM ODBC drivers and created a system DSN.
Thanks!
Oops, should be this:
<%
Dim cn, rs, sql
Set cn = Server.CreatObject("ADODB. Connection ")
cn.Open YourDSN
sql = "SELECT Name FROM Users"
Set rs = cn.Execute(sql)
Do Until rs.EOF
Response.Write rs("Name") & "<br>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
%>
<%
Dim cn, rs, sql
Set cn = Server.CreatObject("ADODB.
cn.Open YourDSN
sql = "SELECT Name FROM Users"
Set rs = cn.Execute(sql)
Do Until rs.EOF
Response.Write rs("Name") & "<br>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm not able to get either of these to work. For the second one, I get ADODB.Recordset error '800a0e7d'
Operation is not allowed on an object referencing a closed or invalid connection.
On the first one, it wasn't recognizing the DSN.
Operation is not allowed on an object referencing a closed or invalid connection.
On the first one, it wasn't recognizing the DSN.
What is,
Set cn = Server.CreateObject("ADODB .Connectio n")
Set rs = Server.CreateObject("New ADODB.Recordset")
cn.Open "Provider=MSDASQL.1;Data Source=FMTest;database=Sam ple02.fp5"
Response.Write cn.State
Which FM version? Which code, and the error line? Any comments on the procedure MS recommended in their article? - You need to feed your consultants :-)
Set cn = Server.CreateObject("ADODB
Set rs = Server.CreateObject("New ADODB.Recordset")
cn.Open "Provider=MSDASQL.1;Data Source=FMTest;database=Sam
Response.Write cn.State
Which FM version? Which code, and the error line? Any comments on the procedure MS recommended in their article? - You need to feed your consultants :-)
I've been looking at connecting to Filemaker Pro databases with ASP lately. In their literature I read that you can only have 10 seperate connections in a 12 hour period. That's with FP 5.5 anyway.
Might be worth considering.
Might be worth considering.
You can maintain one connection object with ASP and share it...
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept robbert's comment as answer.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
puranik_p
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept robbert's comment as answer.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
puranik_p
EE Cleanup Volunteer
<%
Dim cn, rs, sql
Set cn = Server.CreatObject("ADODB.
sql = "SELECT Name FROM Users"
Set rs = cn.Execute(sql)
Do Until rs.EOF
Response.Write rs("Name") & "<br>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
%>