Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

SQL vs DBF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: SQL vs DBF

    CALocklin,

    If you get frequent corruption when one particular user is active then that should make it easier to isolate your problem. If you have replaced that user's hardware with clean system and the problem still comes up, then some functions or some specific sequence of functions is causing a problem. Spend a day watching everything he/she does. Better yet, have a user, who never or rarely has a problem, watch because differences in procedures will be more obvious to an experienced person.

    Comment


      #17
      Re: SQL vs DBF

      Edit: i looked at all my indexes and I have about 65 indexes over 40 tables. maybe that is why I never have much problems with indexes. Also, anyone on here wants to look at the program, you are welcome to it and the coding will be open(data qill be changed of course) if it is for learning purposes only. I bet you can find areas I could have done better too. I would appreciate any feed back. No programmer can know it all!!!

      I take a back seat to Cal any day, But why have I not had index issues while he is having them daily with less indexes than i have and less users? I only showed one table, not the 40 that I use.

      I do agree with the Selwyn brothers about sql. i think it is the greatest thing they have done for us in a long time(themselves too). i would switch to sql in a heartbeat, but the runtime pricing makes it prohibitive for my own business. I am talking about the per seat pricing.

      It just depends on what you are doing.
      Last edited by DaveM; 05-01-2008, 11:35 AM.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #18
        Re: SQL vs DBF

        I think that the "update()" function frequently causes index corruption. But how to "live" without using this function?
        Cheers
        Mauricio

        Comment


          #19
          Re: SQL vs DBF

          I haven't seen people use the update() function until recently. In fact, it never occurred to do this until I saw it in use recently. The "traditional" method has been like this:

          Code:
          tbl.change_begin()
            tbl.somefield = "somevalue"
          tbl.change_end(.t.)
          -Steve
          sigpic

          Comment


            #20
            Re: SQL vs DBF

            mmm i think that that one causes problems to indexes on dbf files too..
            Cheers
            Mauricio

            Comment


              #21
              Re: SQL vs DBF

              Don't think I have ever used the update function like update(). I have(but seldom) done the

              Code:
              tbl.change_begin()
                tbl.somefield = "somevalue"
              tbl.change_end(.t.)
              I do use the operations to update fields. I guess it is the same thing.
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #22
                Re: SQL vs DBF

                i widely use the update() function to update fields from a web application dialog, and yes indexes get corrupted often.
                Cheers
                Mauricio

                Comment


                  #23
                  Re: SQL vs DBF

                  Originally posted by mmaisterrena View Post
                  i widely use the update() function to update fields from a web application dialog, and yes indexes get corrupted often.
                  IS THIS REALLY TRUE? Indexes are getting corrupted often on your WEB application?

                  If true, that scares the heck out of me. I wasn't having any problem at all because I was using NO indexes, only queries, in my web apps - just in case. However, some recent change (and my pages haven't changed in over a year so it's not my pages) is causing my customers to complain about frequent "Error 500 - could not create temporary files when running query" messages. Similar errors occurred occasionally in the past but now they are frequent. I tracked them down and every one was indeed occuring at a <tbl>.query_create() function. The problems aren't just at one line or even just one page. It seems to be happening all over at random.

                  I was hoping to add indexes as a workaround since nobody wants to own up to causing the problem. (I think it might have something to do with the servers at the ISP but I'm not sure.) However, if indexes can get messed up on the WAS, I'll have to tell customers they will have to tough it out - I prefer a minor inconvenience (click the 'Back' button and try again) over corrupted data because of index problems.

                  Comment


                    #24
                    Re: SQL vs DBF

                    doesn't a query get added to the index and if so, shouldn't it be deleted after it is run? Can't you create a temporary query that never goes to the index?

                    Sounds like the update() function and how it is used needs to be invetigated.
                    Dave Mason
                    [email protected]
                    Skype is dave.mason46

                    Comment


                      #25
                      Re: SQL vs DBF

                      If you don't have any indexes then theres nothing to corrupt.
                      so you don't seem to have a problem
                      Cheers
                      Mauricio

                      Comment


                        #26
                        Re: SQL vs DBF

                        Originally posted by DaveM View Post
                        doesn't a query get added to the index and if so, shouldn't it be deleted after it is run? Can't you create a temporary query that never goes to the index?

                        Sounds like the update() function and how it is used needs to be invetigated.
                        A query never gets "added" to the index. Some queries will use an index if one is available but I didn't have any indexes to start with.

                        A "temporary" query in Alpha terms is only temporary in the sense that "Alpha Five will automatically delete this query if necessary if building a new query would cause it to run out of query slots. there are a maximum of 16 query slots."

                        The only other way that I know of to make a query temporary would be to create it with a pointer to the query then "drop" the query when done. Something like this:
                        ptr = <tbl>.query_create()
                        ... Do whatever needs to be done.
                        ptr.drop()

                        From the Help files:
                        The <QUERY>.DROP() method deletes the query list file ($$*.MPX) referenced by the <QUERY> object pointer.

                        FWIW: I even created all my queries with the "MNT" options which tells them NOT to use any indexes even if they are available, NOT to reuse an existing query even if the definition of an existing query matches exactly, and to make it a temporary query as defined above.

                        HMMMMM: As I was adding the info about the <QUERY>.DROP() method it occurred to me that I might try that in my web pages. Maybe the "can't create temporary file" error is happening because of a timing issue that isn't allowing the "temporary" file to get dropped soon enough when attempting to add another query.

                        Comment


                          #27
                          Re: SQL vs DBF

                          I'd say that it is essential to use the idx = t.query_create(). idx.drop() construct for all queries. If you don't one of two things is going to happen (1) after some time you will get a "maximum indexes attached error" or (2) you will have problems with temp files. These problems are especially acute when running on servers such as under Terminal Services or Citrix. There might be a parallel there with web-based apps.

                          I can't say that by always dropping queries all of our problems with queries and temp files have been completely eliminated. I do know they have been drastically reduced.
                          Finian

                          Comment


                            #28
                            Re: SQL vs DBF

                            Originally posted by Finian Lennon View Post
                            I'd say that it is essential to use the idx = t.query_create(). idx.drop() construct for all queries. If you don't one of two things is going to happen (1) after some time you will get a "maximum indexes attached error" or (2) you will have problems with temp files. These problems are especially acute when running on servers such as under Terminal Services or Citrix. There might be a parallel there with web-based apps.

                            I can't say that by always dropping queries all of our problems with queries and temp files have been completely eliminated. I do know they have been drastically reduced.
                            I suspect that in reality you may be correct but have you checked out the "T" option for queries:

                            T -- Temporary query. Alpha Five will automatically delete this query if necessary if building a new query would cause it to run out of query slots. There are a maximum of 16 query slots.

                            According to that Help text, if all the queries were created with the "T" option, they (or at least one of them) should get dropped automatically when query #17 is created. Since the users who have problems can simply push the Back button and it always works the 2nd time around, I suspect there is a timing issue. Hence the HMMMM in my previous post. Although I don't use this technique on the desktop very often, I've never had a problem when I did. However, I think I'll use the "drop" method from now on. That should eliminate the chances for most timing issues.

                            I'm going to change my web pages soon. I was going to start earlier but discovered that I forgot to move them to my new computer. I'll post the results as soon as the job is done and we've had time to get feedback from users - probably won't get much feedback until next Tuesday or Wednesday.

                            Comment

                            Working...
                            X