January 27, 200520 yr I've been trying to use Dreamweaver to develop some simple pages connecting to my filemaker db at work. I've got a successfull connection going with my Filemaker DB and I have successfully displayed some information from the DB on a page for testing...that worked. I am having issues with inserting records and mostly issues with spaces in these field names. Almost all of the field names in the Filemaker DB have spaces. For instance I'm trying to do a very simple lookup based on an item number... <% Dim rsResults__MMColParam rsResults__MMColParam = "1" If (Request.QueryString("itemNumber") <> "") Then rsResults__MMColParam = Request.QueryString("itemNumber") End If %> <% Dim rsResults Dim rsResults_numRows Set rsResults = Server.CreateObject("ADODB.Recordset") rsResults.ActiveConnection = MM_connProducts_STRING rsResults.Source = "SELECT * FROM Auctions WHERE Auction Number = " + Replace(rsResults__MMColParam, "'", "''") + "" rsResults.CursorType = 0 rsResults.CursorLocation = 2 rsResults.LockType = 1 rsResults.Open() rsResults_numRows = 0 %> The above is what it gives me by default. I am getting a parsing error with this, however. I have tried the following after what I read about [] at a FAQ page: <% Dim rsResults__MMColParam rsResults__MMColParam = "1" If (Request.QueryString("itemNumber") <> "") Then rsResults__MMColParam = Request.QueryString("itemNumber") End If %> <% Dim rsResults Dim rsResults_numRows Set rsResults = Server.CreateObject("ADODB.Recordset") rsResults.ActiveConnection = MM_connProducts_STRING rsResults.Source = "SELECT * FROM Auctions WHERE [Auction Number] = " + Replace(rsResults__MMColParam, "'", "''") + "" rsResults.CursorType = 0 rsResults.CursorLocation = 2 rsResults.LockType = 1 rsResults.Open() rsResults_numRows = 0 %> I get the exact same result. Are the spaces what's causing my problem? Is there an easy fix? Any information would be greatly apprecaited. Thanks!
January 27, 200520 yr Here is a response you are probably not looking for... I do a lot of Filemaker stuff with ASP, but I do not use ADODB (which I realize is a standard approach with most other databases) because theFM ODBC connection a tortoise. If you have any appetite for XML, I beleve it is highly superior way to talk to FM via ASP or any other web framework, but you have get through some pretty serious learning, and there doesn't seem to be support out there in this area. I would only suggest that you consider using FM XML with ASP if you are going to be doing lots of web development...otherwise the learning curve doesn't pay off. Having given you that worthless advice, have you you tried the trick with fields that do not have spaces? And have you tried the request from inside an Excel spreadsheet where it would be a lot easier testing the ODBC/SQL reqests? i.e., ASP can be a bear to test because of the limited value of error messages.
Create an account or sign in to comment