ASP and Filemaker insanity

ASP and Filemaker insanity

Post by George Bradl » Wed, 10 Jan 2001 07:49:09



<vent>

It was bad enough when the version 5 broke all of the ease of web
publishing (no longer supporting Homepage, crippled server functions on the
regular version, etc,,,) but try and find any information or examples on
how to use ASP with it.

I can set up the DSN and I can create connection objects and although I can
create a recordset, I can find no way to query the database with a SQL
string.  I suppose that someone, somewhere as done it but I have yet to
find any thing on the web except other questions from users trying to do
the same thing.

Is there no Filemaker marketing department?  

</vent>

Can anyone share an example with me on how to do a simple
"SELECT * FROM table query?

Thanks

 
 
 

ASP and Filemaker insanity

Post by C. Alex Lord » Fri, 12 Jan 2001 12:00:57


Whoa!! before you waste any more time. FM's web companion is not compliant
with ASP, only CDML, LDML, XML, and JDBC.

--

C. Alex Lorda


Quote:> <vent>

> It was bad enough when the version 5 broke all of the ease of web
> publishing (no longer supporting Homepage, crippled server functions on
the
> regular version, etc,,,) but try and find any information or examples on
> how to use ASP with it.

> I can set up the DSN and I can create connection objects and although I
can
> create a recordset, I can find no way to query the database with a SQL
> string.  I suppose that someone, somewhere as done it but I have yet to
> find any thing on the web except other questions from users trying to do
> the same thing.

> Is there no Filemaker marketing department?

> </vent>

> Can anyone share an example with me on how to do a simple
> "SELECT * FROM table query?

> Thanks


 
 
 

ASP and Filemaker insanity

Post by Bob Osol » Sat, 13 Jan 2001 07:02:08




Quote:> Whoa!! before you waste any more time. FM's web companion is not compliant
> with ASP, only CDML, LDML, XML, and JDBC.

Actually, FMP ODBC *does* work with ASP. Using W98 and a suitable FMP ODBC
DSN, I fired up an FMP table in an ASP, and it worked just fine. But I was
damned if I could get it to work under W2000. I finally succeeded last
night. I originally suspected a permissions issue, but I was dead wrong. I
now think it's down to ODBC differences. Neither File nor System DSNs worked
under ASP, even tho they worked fine between Access and FMP. The answer was
to hand-build a DSN-less connection with some settings copied from the FMP
ODBC registry entries. Real Sherlock Holmes stuff!

The trick is to (1) fire up FMP and load up the file you want to
webshare -you also need TCP/IP protocol. (2) enable RDAC (not LDAC) and
multi-user sharing on the file, even if the file is on the same box as the
webserver. (3) Don't bother making a DSN - use a DSN-less connection string,
which allows you to easily fiddle with some otherwise hidden settings. (4)
Note the unusual handling of field names with spaces in the SQL string.

My ASP connection code to the Sample05 file is appended. Be sure that the
UseRemoteConnection setting is 1 (the Registry default is 0). I have spent
*ages* fooling with this to get it working. Normal ASP connections are
*much* simpler than this. I am going in under the hood here, somewhat.

My conclusions are:

(a) It's hardly worth the effort. FMP/ASP is no speed demon.
(b) If FM Inc had wanted FMP to work with ASP, they would have made it a lot
easier for us. They want you to stick with CDML, etc, primarily (I suspect)
because an ODBC connection cannot be monitored in terms of connected users,
and thus FM Inc cannot enforce the 12 user limit nonsense under ASP. It's a
shame really. ASP has many, many more users than CDML. Decent, documented
ASP support would certainly help widen the appeal of FMP in the PC market.

Regds, Bob Osola

<% Option Explicit
'************************************************************
' ASP Generic data viewer
' Connects to an DSN-less FMP data source
' Displays the data in a table
'************************************************************

   Dim oCon, oRS, strSQL, strCon, oField
   const adOpenKeyset = 1       '(adOpenDynamic = 2, adOpenStatic = 3)
   const adLockOptimistic = 3
   const adCmdText = 1

   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 oCon = Server.CreateObject ("ADODB.Connection")
   oCon.Open strCon

   Set oRS = Server.CreateObject("ADODB.Recordset")
   strSQL = "SELECT `First Name`,`Last Name`,`Home Address 1`," _
          & "City,Country,Company,`Fee Paid`,`Date Paid`," _
          & "`Membership Type` FROM Sample05"
   oRS.Open strSQL, oCon, adOpenKeyset, adLockOptimistic, adCmdtext
%>
<HTML>
<HEAD><TITLE>Simple Data Viewer</TITLE>
<STYLE>
BODY {font-family: verdana; margin:3em; background-color: ivory}
TABLE,TD,TH{font-size: smaller; border: thin ridge aqua; border-collapse:
collapse; padding: 3px;}
</STYLE>
</HEAD>
<BODY>
<P>This is a FileMaker Pro table viewed via ASP and ODBC:<BR><BR>
<TABLE>
<TR>
<% For each oField in oRS.Fields %><TH><%=oField.Name %></TH><% next %></TR>
<% Do while not oRS.EOF %>
<TR>
<% For Each oField in oRS.Fields%>
  <TD>
<% If IsNull(oField) then
     response.write "&nbsp;"
   else
     response.write oField.value
   End if %>
   </TD>
<% Next
   oRS.movenext %></TR>
<% loop %></TABLE></BODY></HTML>
<% oRS.Close
   oCon.Close
   set oRS = nothing
   set oCon = nothing
%>

 
 
 

1. stored procedure insanity

I appear to be losing my grip on reality :o)

I have a stored procedure that takes 21 seconds to run.  If I copy the exact
code with the exact parameters to the query analyzer, it takes less than a
second to run.

I have tried running the SP with recompile and updating all the
statistics... Neither changed the slow result.

It is from one particular complex join in the SP that sqlserver chooses the
wrong index for in the SP but chooses the correct index in the query
analyzer - but again, i just cut and paste the code to the query analyzer
and it runs just fine with the right index, but that same code in a SP takes
21 seconds.

Do you have any ideas of what I should try from this point?

2. DTS Problem ??

3. BCP in problem, insanity looming!

4. JDBC SQL exception

5. noholdlocks

6. DBLookupComboBox- Insanity By Design?

7. Looking for dutch Oracle specialists

8. Dates, SQL and insanity oh my...

9. Password insanity - newbie

10. Password insanity :

11. Filemaker and ASP

12. ASP & FileMaker