?
Solved

FileMaker Pro and ASP

Posted on 2001-06-02
8
Medium Priority
?
671 Views
Last Modified: 2008-03-06
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!
0
Comment
Question by:marija
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 8

Expert Comment

by:drittich
ID: 6149178
Sure.  Once you have created the system DSN, do this:

<%
Dim cn, rs, sql
Set cn = Server.CreatObject("ADODB.Connection")
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
%>
0
 
LVL 8

Expert Comment

by:drittich
ID: 6149181
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
%>
0
 
LVL 15

Accepted Solution

by:
robbert earned 150 total points
ID: 6149189
There is a knowledgebase article on that:
HOWTO: Connect to FileMaker Pro from Visual Basic with ODBC
http://support.microsoft.com/support/kb/articles/Q281/7/55.ASP

The VB code from there translated to VBScript is:

    Set cn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject("New ADODB.Recordset")

    cn.Open "Provider=MSDASQL.1;Data Source=FMTest;database=Sample02.fp5"
    cn.CursorLocation = adUseClient
    rs.Open "Select * from Sample02.fp5", cn
   
    For counter = 0 To rs.Fields.Count - 1
        Response.Write rs.Fields(counter).Name & "<br>"
    Next counter

    Do While Not rs.EOF
        Response.Write rs.Fields(0).Value & "<br>"
        rs.MoveNext
    Loop

It's a long time that I worked with Filemaker Pro, and I never accessed it via ODBC, just imported tables to SQL Server. - Remember, FM is probably not meant to be used with web applications - regarding ADO functionalities being available and scalability.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:marija
ID: 6149258
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.
0
 
LVL 15

Expert Comment

by:robbert
ID: 6149303
What is,

   Set cn = Server.CreateObject("ADODB.Connection")
   Set rs = Server.CreateObject("New ADODB.Recordset")

   cn.Open "Provider=MSDASQL.1;Data Source=FMTest;database=Sample02.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 :-)
0
 
LVL 1

Expert Comment

by:davemillhouse
ID: 6151835
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.
0
 
LVL 8

Expert Comment

by:drittich
ID: 6152892
You can maintain one connection object with ASP and share it...
0
 
LVL 14

Expert Comment

by:puranik_p
ID: 8522870
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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question