Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (VFP)
 Converting Snitz to run on a VFP back end
 Forum Locked
 Printer Friendly
Author  Topic Next Topic  

Gregg
Starting Member

4 Posts

Posted - 26 October 2000 :  01:05:51  Show Profile
I'm currently working on setting up a running version of Snitz Forums with a VFP back end. I have the data layout done and a database container built. I'll upload the code here in a few days that will build the dbc and the dbf tables and populate them with the usual Snitz default settings. I had the challenge of coming up with a way to have the indexes increment automatically. A trigger on Insert wouldn't do the job. I didn't want to have to create any code outside the dbc. It turned out that the answer was really fairly simple. I created a stored procedure that is table-driven and will return the next available key when passed the names of the table and the key field. Then, using the Table Designer screen, I call the procedure as the default value of the key field. In config.asp, I set strDBType = "vfp" and set strConnstring = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBC;SourceDB=c:\mypath\Snitz_Forums.dbc"

I still need to finish debugging some of the screens. There are a few SQL statements that have a semicolon at the end. Those would bomb in VFP. I expect that I will have to use the strDBType variable and write some VFP specific selects. Once I have all the SQL ironed out, I will need to go through them again and make sure that each table is indexed properly so that VFP will run at it's fastest.

I hope to come up with an script for VFP to create the forum data structures, like inc_create_forum_SQL7.asp does for SQL Server 7. That would be cool.

Why Visual FoxPro? It's much faster than Access when having to deal with larger amounts of data. It's not overly expensive and some non-programmers just can't be convinced to use MySQL. Besides, it's just there, baby! (Sorry, I saw some of Austin Powers last night.)

Gregg

~~~ Gregg ~~~<

Gregg
Starting Member

4 Posts

Posted - 27 October 2000 :  19:25:27  Show Profile
I'm a bit underwhelmed at the volume of responses received thus far to the idea of using a VFP backend with Snitz Forums....... :)

The work goes on. I hope to be able to give everyone a full description of what I've found and put the code out there so I can get a few people out there to help me beta test my solution.



~~~ Gregg ~~~<
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 27 October 2000 :  23:11:40  Show Profile
The minimal intrest is probably because Foxpro isn't a very common DB on web servers. I'm on a progressive MS ISP host, no VFP there :)

Don't feel too bad, VFP has now beated out DB2 in posting activity

======
Doug G
======<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 28 October 2000 :  12:26:37  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
Quite true, VFP is still one of the fastest database engines out there. MS bought Fox software because of the key people and technology behind FoxPro (Rushmore). I've been using Fox since the mid '80s (When it was just FoxBase).

As for hosts who support it, it's actually pretty well accepted by most of the hosts I've seen (at least as an ODBC data source).

For hosts that allow custom DLLs, the speed and flexibility is still hard to beat.

BRAVO for your work! Let us know how it goes.



Fez
Developer of CouponPages.Com<
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 29 October 2000 :  15:05:12  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Yup... dual applause :) just keep track of your changes, and as far as the semicolons at the end of SQL Statments, I believe it is safe to just remove them. they realy don't do anything for most instances of SQL.

Reinsnitz (Mike)
><)))'>

"I no longer call you servants, because a servant does not know his master's business. Instead I have called you friends..."
-- John 15:15
<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 16 November 2000 :  20:16:28  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
Any progress?

If I don't hear from you, I'll assume you gave up, and then I'll give it a crack. It's worth the effort considering the speed of VFP, and the high availability of tools.


Fez
Developer of CouponPages.Com<
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 November 2000 :  17:39:43  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Gregg is at school right now, and hoping to be back in about a month... at which time he'll be resuming his very successfull work :)

Reinsnitz (Mike)
><)))'>

"I no longer call you servants, because a servant does not know his master's business. Instead I have called you friends..."
-- John 15:15
<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 19 November 2000 :  18:29:01  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
I look forward to seeing it, and sharing my results. Of course I should be finished before then. :)


Fez
Developer of CouponPages.Com<
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 19 November 2000 :  19:58:36  Show Profile
I just noticed VFP is supported at my ISP too. I didn't know that. I have it but I've never used it.

======
Doug G
======<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 19 November 2000 :  21:43:12  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
Here's something interesting. As I mentioned in the Oracle forum, I wrote my autonumber script in ASP, then I changed databases on a test system and posted some dummy records. Then I changed back to the Access file, and was going to turn off the autonumber option so that it could be filled in by the script from now on, but it actually worked there too!!!

That caught me off guard. It didn't reject being fed a number in the autonumber field. I know SQL Server 7.0 once rejected a similar post...

Even though it was a nice surprise, it's a bug in Access if you ask me. If something is an autonumber field, it shouldn't let you put something there.


Fez
Developer of CouponPages.Com<
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 20 November 2000 :  00:16:07  Show Profile
Hmmm, I get -2147217887: Cannot update 'MessageID'; field not updateable when I try to update an autonumber column. This came from an UPDATE TABLE set MessageID=10 where ...

My recollection is that you cannot update or change an autonumber field. You can use something to copy existing autonumber values to a new table in SQL Server, maybe Access, but I don't know how you changed a value.

======
Doug G
======<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 20 November 2000 :  10:15:42  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
I didn't change the value, I was inserting a value. Of course, the numebr being inserted has to be larger than any number already in the table, which it was. So in my case I have a test table with 5 records 1.. 2.. 3.. 12.. 13. I put my code to work after the first 3 were auto generated. It allowed the 12 and 13 to be added to my autonumber field. This was NOT the case with my tests on SQL Server 7. That system will not permit any value in those key fields. The Access 2000 file did allow the INSERTS. I never tried to change it with an update.


Fez
Developer of CouponPages.Com<
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 20 November 2000 :  12:56:07  Show Profile
After cruising the Access docs, it does appear that you can insert an existing value into an autonumber field, different from SQL server where you can't. It seems to be by design, not a bug.

======
Doug G
======<
Go to Top of Page

retro
Junior Member

123 Posts

Posted - 09 August 2001 :  18:49:41  Show Profile
Just curious...

Did anyone ever complete the DB modifications to run a FoxPro backend? My ISP allows FP tables and their ability to handle data better than Acess and smaller cost (reads...FREE) via my ISP makes in an attractive option.

Anyone????

Thanks

Sean

<
Go to Top of Page

Fez
Starting Member

USA
25 Posts

Posted - 04 December 2001 :  10:37:20  Show Profile  Visit Fez's Homepage  Send Fez an AOL message
quote:
Did anyone ever complete the DB modifications to run a FoxPro backend? My ISP allows FP tables and their ability to handle data better than Acess and smaller cost (reads...FREE) via my ISP makes in an attractive option.


I pulled the plug after Mike said that Gregg was working on it.

quote:
Gregg is at school right now, and hoping to be back in about a month... at which time he'll be resuming his very successfull work :)

Reinsnitz (Mike)



There was a lot of debate about the method of handling the autonumber feature. I ended up writing my own version that does not use an autonumber.

Since VFP 7.0 has a true ADO Provider, the VFP version is even more attractive.


Fez
Developer of CouponPages.Com<
Go to Top of Page
   Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07