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

Active Link not adding New Record

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

  • Active Link not adding New Record

    Am working against MS Sql Data with active link table:
    From within browse am able to upadate "on the fly" with no hassals what so ever.
    The same database is used against a V8Ent edition passive link table with a form which dumps new records to a local table. Using V8 table to database function I can insert records in the remote MS Sql with no problems.

    In V9 using a form I can edit records with no problem . In add new record the Remote Database returns an API exception call. Regarding a MS Sql unique record index. In database scheme their is a system Index on the table in question which when entering enter mode in form brings up an autoincrement caption for indexed column field value.

    Why does an ordinary insert function using sql work whilst, the V9 add new record does not?
    “There is nothing like a dream to create the future.”
    But then again:
    Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

  • #2
    Re: Active Link not adding New Record

    Hm.... I have been experiencing similar problems but I know this worked a while back... maybe my installing the RT update messed things up?

    Comment


    • #3
      Re: Active Link not adding New Record

      Originally posted by NoeticCC View Post
      Hm.... I have been experiencing similar problems but I know this worked a while back... maybe my installing the RT update messed things up?
      it is really impossible that installing a RT update could have any impact.

      Comment


      • #4
        Re: Active Link not adding New Record

        Originally posted by christobal View Post
        Am working against MS Sql Data with active link table:
        From within browse am able to upadate "on the fly" with no hassals what so ever.
        The same database is used against a V8Ent edition passive link table with a form which dumps new records to a local table. Using V8 table to database function I can insert records in the remote MS Sql with no problems.

        In V9 using a form I can edit records with no problem . In add new record the Remote Database returns an API exception call. Regarding a MS Sql unique record index. In database scheme their is a system Index on the table in question which when entering enter mode in form brings up an autoincrement caption for indexed column field value.

        Why does an ordinary insert function using sql work whilst, the V9 add new record does not?

        you need to take a look at the active link table definition and see what the actual sql is for the InsertSQL statement. That might give you a clue.

        Also, you should edit the connection string to your database and turn on SQL Debugging.

        This will add this to the connection string:

        A5TraceSQL=Y

        Then do an insert using the Browse or a Form and after you get the error message, go to View/Trace Window SQL Tab to see what the actual SQL was that A5 tried to execute against the SQL database.

        That might tell you where the error was.

        You might need to use a custom Insert SQL statement (rather than the auto-generated statement that a5 creates when you define an active-link table).

        Comment


        • #5
          Re: Active Link not adding New Record

          Originally posted by Selwyn Rabins View Post
          it is really impossible that installing a RT update could have any impact.
          Even if it went in the wrong folder & was an update that edited the registry?

          Comment


          • #6
            Re: Active Link not adding New Record

            It seems that the default sql select statements include (count) function from the sql trace window.
            Why? This is an overhead in the connection API especially to non indexes tables. (which normally return some obscure non documented error)Why not count the records locally?
            “There is nothing like a dream to create the future.”
            But then again:
            Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

            Comment


            • #7
              Re: Active Link not adding New Record

              Originally posted by christobal View Post
              It seems that the default sql select statements include (count) function from the sql trace window.
              Why? This is an overhead in the connection API especially to non indexes tables. (which normally return some obscure non documented error)Why not count the records locally?
              i don't understand the question.

              i can't see how counting records on the client side would be a good idea.
              to do that you would need to bring down all of the records in the table to the client.

              what it the table had millions of rows? it would take hours. whereas a count query executed on the server should be quick (at least for most databases).

              (excluding MySQL, which has awful performance for count queries).

              Comment


              • #8
                Re: Active Link not adding New Record

                so why select(count) on the server side?
                “There is nothing like a dream to create the future.”
                But then again:
                Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

                Comment


                • #9
                  Re: Active Link not adding New Record

                  Originally posted by christobal View Post
                  so why select(count) on the server side?
                  sorry. still don't understand the question.

                  i don't understand what point you are trying to make.

                  Comment


                  • #10
                    Re: Active Link not adding New Record

                    Selwyn Im not trying to make any point. The problem is adding a new record in an active link table against a remote MS Sql server database engine.
                    This is a topic which is extremely difficult to debug, each case is unique and the usual bug handling method is non applicable in the active link scenario due to the fact that it is impossible to create a working example and upload it to the message board. Simply because there is no way to include the SQL databases in question.
                    A detailed explanation of the code generated by the active link table genie in AV9 would be of assistance along with an expanation of the code used when trying to add a new record.The SqlTrace window information is at least in my case of little use without some background information.
                    “There is nothing like a dream to create the future.”
                    But then again:
                    Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

                    Comment


                    • #11
                      Re: Active Link not adding New Record

                      Chris, I know nothing about SQL Server data but I'm curious whether you've defined an autoinc field rule in the active link table? If so, do you get the same error if you remove that field rule?

                      Comment


                      • #12
                        Re: Active Link not adding New Record

                        Originally posted by christobal View Post
                        .The SqlTrace window information is at least in my case of little use without some background information.
                        I think posting the SQL trace info may give Selwyn (and others) a clue as to what you are referring to, since it is showing the command sent to your server.
                        Bill Griffin
                        Parkell, Inc

                        Comment


                        • #13
                          Re: Active Link not adding New Record

                          Originally posted by christobal View Post
                          Am working against MS Sql Data with active link table:
                          From within browse am able to upadate "on the fly" with no hassals what so ever.
                          The same database is used against a V8Ent edition passive link table with a form which dumps new records to a local table. Using V8 table to database function I can insert records in the remote MS Sql with no problems.

                          In V9 using a form I can edit records with no problem . In add new record the Remote Database returns an API exception call. Regarding a MS Sql unique record index. In database scheme their is a system Index on the table in question which when entering enter mode in form brings up an autoincrement caption for indexed column field value.

                          Why does an ordinary insert function using sql work whilst, the V9 add new record does not?
                          the easiest way to resolve this is for you to send me the 'create table' sql statement for your table.

                          i can then recreate the table and try to duplicate the problem.

                          if we can duplicate, it will be fixed asap.

                          Comment


                          • #14
                            Re: Active Link not adding New Record

                            The table is an existing sql table to which I connect to. As stated before using V8 Ent I added records to this table with no problem using the following code.
                            Code:
                            DIM conn as SQL::Connection
                            dim flagResult as l 
                            flagResult = conn.open("::Name::demo")
                            if flagResult = .f. then 
                            	ui_msg_box("Error","Could not connect to database. Error reported was: " + crlf() + cn.CallResult.text)
                            	end 
                            end if
                            dim ti as SQL::TableInfo
                            dim rs as SQL::ResultSet
                            dim tbl as P
                            dim insert as C
                            if .not. SQL_TableInfoOfDBF("C:\a5\app_settings\dtemp.dbf", ti) then
                            ui_msg_box("Error", "Cannot populate SQL::TableInfo")
                            conn.close()
                            end
                            end if
                            ti.Name = "Accounts"
                            insert = conn.GenerateInsertStatement(ti)
                            tbl = table.open("C:\a5\app_settings\dtemp.dbf")
                            rs = conn.ResultSetFromDBF(tbl)
                            if .not. conn.ApplyData(insert, rs)
                            ui_msg_box("Error", conn.CallResult.text)
                            end
                            end if
                            tbl.close()
                            conn.close()
                            With the launch of V9 and active link tables I hoped to discard the use
                            of the above procedure as it would remove the need of a "temp table" and all the associated procedures to retrieve the required result.

                            The returning message box notifies the number of records added as successful.

                            V9 when connecting to this same table using the same named connection "demo" it apparently hooks up to a server side table schema index from within the data base , which returns the second column of the table defined as "C" "15" in table schema, as an "autoincrement type field". This index is not connected in any way for data entry. From within the V9 database explorer the field returns the same autoincrement description. From within V8Ent this is not the case the same field is represented as defined before "C" "15"
                            “There is nothing like a dream to create the future.”
                            But then again:
                            Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

                            Comment


                            • #15
                              Re: Active Link not adding New Record

                              Originally posted by Tom Cone Jr View Post
                              Chris, I know nothing about SQL Server data but I'm curious whether you've defined an autoinc field rule in the active link table? If so, do you get the same error if you remove that field rule?
                              No changes have been made anywhere
                              “There is nothing like a dream to create the future.”
                              But then again:
                              Basic research is what I am doing when I don't know what I am doing and to steal ideas from one person is plagiarism; to steal from many is research!

                              Comment

                              Working...
                              X