Newbies HTKyle Posted April 7, 2006 Newbies Posted April 7, 2006 i want to use asp .net to fm8 via odbc... but returns very odd errors... can someone post a link or a sample code on how to do this... a very simple example would be very much appreciated...tnx
MetaSys Software Posted April 7, 2006 Posted April 7, 2006 Hi, We have developed application using FM 7 and ASP.Net. Please let me know what area of sample code are you looking for? is that a connectivity issue you are takling about? Regards, MetaSys Software Pvt. Ltd.
Wim Decorte Posted April 8, 2006 Posted April 8, 2006 What kind of errors? Also check out www.fmDotNet.org. fmDotNet returns a standard DataSet for you to use. It does not use ODBC but FileMaker's XML publishing. For a quick example check out http://db-commerce.com/fmDotNet/F1.aspx (note: hosted from a server in my office with very limited bandwidth, so speed is not great). I can send you the source code for that example if you want.
Newbies Gprev Posted May 22, 2006 Newbies Posted May 22, 2006 Wim, I would very much like to see the source code to the F1.aspx file. TIA, George
Wim Decorte Posted May 22, 2006 Posted May 22, 2006 I'm on the road right now and I'm not sure I have a copy of the source code on my laptop. If I do I'll post it here... In the meantime, if you want to see how fmDotNet works, download the sample application I have up at www.fmDotNet.org. It's for a desktop app, not a website but the code is pretty much the same.
Newbies Gprev Posted May 31, 2006 Newbies Posted May 31, 2006 Wim, I'd still like to see the web page example, if you get the time to post it. I taught myself ASP/VB using working pages as templates. I was hoping to use your page as a starting point for my journey into the world of .NET. Also, when will we get to see an article about fmdotnet in FM Advisor? Thanks much, George
Wim Decorte Posted May 31, 2006 Posted May 31, 2006 The F1 web site is written in C# not VB.NET, would it still make sense for you? Let me know if you'd still want it and I'll put it up.
mshar Posted December 28, 2006 Posted December 28, 2006 (edited) Hi, This looked like a useful post as I am also trying to connect FM8 remotely through my website. I am using C#. I have downloaded fmDotNet sample application but could not make much sense out of it. Can you please post the other sample (F1.aspx) again? I just need a code snippet that I can use as an example that shows how to create an object and insert values in a table in FM, so pasting that in a post will also do. Any help will be greatly appreciated. Thanks, Max Edited December 28, 2006 by Guest
Wim Decorte Posted December 29, 2006 Posted December 29, 2006 Hi Max, What part of the sample C# application doesn't make sense? That app has more to offer than the F1 one so it would make more sense to talk you through the sample app than give you a new sample. The F1 sample does no updating of FM files while the sample app does for instance...
mshar Posted January 2, 2007 Posted January 2, 2007 (edited) Hi Wim, Thank you for your response. I am trying to connect to FM8 and insert a record but the problem is that I don't know which drivers or providers to use and what should be the sequence of statements. I am using the following to accomplish this: ADODB.Connection conn = new ADODB.Connection(); try { conn.Mode = ADODB.ConnectModeEnum.adModeReadWrite; conn.Open(, , , -1); string editQuery = "INSERT INTO conn.Execute(editQuery); } catch (System.Exception ex) { txtOrgName.Text = ex.ToString(); } finally { conn.Close(); } I am getting "Parse Error in SQL" from this code. This is what I get: System.Runtime.InteropServices.COMException: [DataDirect][ODBC SequeLink driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Parse Error in SQL I know this works because it is already working in an ASP page. P.S. I am sorry if I offended you in any way by writing that your application doesn't make any sense to me but I went through the code line by line to find where the connection is made and how data is accessed but could not find it. The application is written nicely but I could not find what I wanted. Please help, Max Edited January 2, 2007 by Guest
mshar Posted January 3, 2007 Posted January 3, 2007 Thank you all for trying. I got it. I just had to insert double quotes for the table name and for all the field names. I did that by using char c = (char)34; in C# as I am prgramming in c#. This small thing ate my day. :D
Wim Decorte Posted January 10, 2007 Posted January 10, 2007 You didn't offend me, don't worry But now it makes more sense: you're using ODBC. fmDotNet does not. fmDotNet uses FileMaker Server's XML interface with fmDotNet being an abtraction layer for .NET programmers so they wouldn't have to worry about making the correct url syntax into FMSA or working with the XML that FMSA returns (fmDotNet returns a DataSete). A connection to FMSA is made like this: fms = new FMSAxml(chosenScheme, theServer, thePort, theAccount, thePW); And a typical query would look like: fms.SetLayout(this.cmbLayouts.Text); FMSAxml.FindRequest query = new FMSAxml.FindRequest(queryType, fms); query.AddSearchField(this.cmbField.Text, this.txtValue.Text, so); ds = query.Execute(); (where ds is a DataSet variable)
mshar Posted January 10, 2007 Posted January 10, 2007 Thank you for the update. I will keep this in mind as I have read that ODBC is very slow and using XML is much faster. Right now my web application has only one insert query but probably in future I may need to write more complex queries where I can use fmDotNet. Do you by any chance know whether exporting to PDF from FMP's IWP is possible or not. I did not receive positive responses for this anywhere but am still hopeful. :)
Recommended Posts
This topic is 6596 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 accountSign in
Already have an account? Sign in here.
Sign In Now