Jump to content

FMConnector not compatible on Windows Server 2003?


Justin Grewe
 Share

This topic is 6533 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Okey, here's my situation. I have almost gotten all of my coding done in the FX.php class for my project for the college. Now the network team says that they can not install php on their server. I have tried to tell them that they could but they refuse. So now my only option was ASP again. But as I began looking at it, it says that the FMConnector, currently the only available option of connecting FileMaker with ASP, is not compatible with Windows 2003(My college is running server 2003). Why is it able to run on 2000, xp but not 2003? Is there a way to get around this? Also, any advice would be appreciated.

Thanks,

Justin Grewe

Link to comment
Share on other sites

I've written a class for ASP 3.0 that allows you to manipulate and retrieve data from FileMaker, very similar to how the FX class works using PHP. I still have a little more testing to do, but it seems to work great so far. The current zip package has the class file, an object map, and about 8 examples that should get you up an running in no time. Each example has one file with sample code, and a supporting text file that describes line by line what the sample code does.

You can download the zip package from http://mariano.petersonpages.com/demo/asp/FMPasp_v0-2.zip

Here is some sample code that utilizes the FMP class I've written:

<%@LANGUAGE="JScript"%>

<!-- #INCLUDE FILE="FMP.asp" -->

<%

/********************************************************

	EXAMPLE 3 - INSERT NEW RECORDS

	This example illustrates how to insert new records

	into a FileMaker table using the FMP class.

********************************************************/

 

// Create request

fm = new FMP("roster.fp5", "web");

fm.action = "insert";

fm.param("name", "Doe, John");

fm.param("position", "Bench warmer");

fm.param("weight", "200");

result = fm.execute();

 

if (result.meta.errorCode) {

	Response.write("Error: " + result.meta.errorCode);

}

else {

	Response.write("New record added to the roster table:<br>n");

	Response.write("-----<br>n");

	Response.write("Name: " + result.row[0].data.name + "<br>n");

	Response.write("Position: " + result.row[0].data.position + "<br>n");

	Response.write("Weight: " + result.row[0].data.weight + "<br>n");

	Response.write("-----<br>n");

	Response.write("FileMaker record ID: " + result.row[0].meta.recID + "<br>n");

}

 

%>

Link to comment
Share on other sites

Mariano,

I feel this class is great but I am wondering if also works with multiple instances of say inserting records as in FX.php? I am pretty sure it is possible but I am just making sure. Also, how does your class handle sessions?

Thanks.

Justin Grewe

Link to comment
Share on other sites

The FMP class I wrote does not handle sessions - neither does the FX class.

PHP and ASP both have session management built in. I think PHP's support for sessions is far superior to that implemented by ASP. But if you're in an ASP environment, well...

As far as multiple instances go, you can create as many instances of the FMP class as you need. However, unlike the FX class, you do have to create a new instance of the FMP class for each request to the database. The example below is loosly based on a previous explanation I provided on how to send multiple calls to the database using FX:

http://www.fmforums.com/threads/showflat.php/Cat/0/Board/UBB12/Number/94565/page/0/view/collapsed/sb/5/o/o/fpart/all#95173

The following example illustrates how the FMP class requires you to create a new instance for each call to the database (notice the repeated use of "new FMP(...)"):

$query = new FMP("file.fp5", "anyLayout");

$query.param("name", "Mariano Peterson");

$result_1 = $query.execute("insert");

 

$query = new FMP("otherFile.fp5", "otherLayout");

$query.param("hobby", "snowboarding");

$result_2 = $query.execute("insert");

Link to comment
Share on other sites

This topic is 6533 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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