Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ASP and FileMaker

Featured Replies

  • Newbies

I'm currently designing a web site for a local company that uses FileMaker Pro 5. I'd really like to use ASP to connect to the database since it's the language I'm most familiar with. However, I'm running into several problems and have come up with many questions.

I keep on getting an "Connect failed" error and an "Open failed" error. I have absolutely no clue why the connection doesn't work. I've tried several different things, and it just won't budge. I found some information today that I'm going to try but I'm pretty sure I still need help. Below are two different copies of code that I've tried.

At the moment for development/testing purposes, I'm using Microsoft's Personal Web Server and FileMaker Pro 5 trial version (since I really don't want to spend the money for a full copy.) The site will be moved to an IIS server when it is completed.

Some of the questions I have are as follows (I'll post more later as I perform additional research):

1) Do I need to have FileMaker running when I access the site?

2) Is there any language that does not require FileMaker to be running on the server or even on the server?

3) Are there any examples on the web that use ASP and FileMaker?

4) Could someone email the ASP that they have used to connect to FileMaker?

5) What are some of the issues I should be aware of using ASP and FileMaker?

If someone could also look at the code below and tell me what I'm doing wrong, that would be greatly appreciated.

Thanks in advance for the help.

Sincerely,

webmstr_ad

--------------ASP Example 1------------------

verification=<%@ Language=VBScript %>

<%

' ASP Generic data viewer

' Uses GetRows method (requires MDAC 2.1 or better)

' by Bob Osola 12-Feb-2001

Dim oCon, oRS, strSQL, strCon

Dim strTblName

Dim arRS, numCol, numRow, data

const adOpenForwardOnly = 0

const adLockOptimistic = 3

const adCmdText = 1

strCon = "information" ' DSN name

strTblName = "example" ' FM Pro file name (minus .fp5)

Set oCon = Server.CreateObject ("ADODB.Connection")

oCon.Open strCon

Set oRS = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT * FROM " & strTblname

oRS.Open strSQL, oCon, adOpenForwardOnly, adLockOptimistic, adCmdtext

arRS = oRS.GetRows

%>

This is FileMaker Pro table <%=strTblname%>

viewed via ASP and ODBC at <%=now %>

<%

For numRow = 0 to Ubound(arRS,2)

response.write ""

For numCol = 0 to Ubound(arRS,1)

response.write ""

If arRS(numCol, numRow) <> "" then

response.write arRS(numCol, numRow)

Else

response.write " "

End If

response.write ""

Next

response.write "" & VbCrLf

Next

oRS.Close

oCon.Close

set oRS = nothing

set oCon = nothing

%>

--------------ASP Example 2------------------

verification=<%@ Language=VBScript %>

<%

strCon = "AllAsText=0;ApplicationUsingThreads=1;" _

& "Driver=FileMaker Pro;FetchChunkSize=100;FileOpenCache=0;" _

& "IntlSort=0;MaxTextlength=255;ServerAddress=127.0.0.1;" _

& "TranslationOption=0;UseRemoteConnection=1"

Set Conn = Server.CreateObject("ADODB.Connection")

Conn.Open strCon

Set querystring = Conn.execute("SELECT subdivision FROM example where password = " & "'" & Request("userPassword") & "'")

%>

<% If RS.EOF then

Response.Write("1")

Else Response.Write(RS("subdivision"))

End If %>

<% RS.Close %>

IMHO -- everyone here (AFAIK) is using much simpler language -- the CDML. Or Lasso LDML.

It is faster. More compact. If you need even more speed, you can use clusters.

  • Author
  • Newbies

I did get the first ASP example to work. Apparently, I hadn't set up the DSN quite right.

I still have some questions, though, that I'd like answered; so if anybody can help, here are my questions:

1) Do I need to have FileMaker always running on the server for the site to work?

2) Do I need to have FileMaker even on the server (other than the ODBC drivers)?

3) Is there any language that does not require FileMaker to be running on the server or even on the server?

4) Are there any examples on the web that use ASP and FileMaker?

5) What are some of the issues I should be aware of using ASP and FileMaker?

Thanks again for the help. I look forward to reading the replies.

Sincerely,

webmstr_ad

Great.

1) Yes, FM MUST run somewhere

2) Maybe not, just the ODBC

3) AFAIK -- does not exist

4) I never saw one

5) Speed. It will be 1/10th or less than the real speed of FM

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.