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

Connecting to SQL backend with ODBC

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

    Connecting to SQL backend with ODBC

    Connecting to SQL backend with ODBC

    I have been experimenting a little with A5v8 and the SQL features. I purchased the Enterprise edition so that I could use the SQL features and, presumably, use A5 to create applications that were based on some back-end SQL database.

    I have had some experience with A5v7 connecting to Access databases and I used A5v7 to move my previous Access tables over to A5 to begin using A5 as my application tool instead of Access. It appears that A5v8 handles connections to Access in the same way as was used in v7. However, I am not sure I understand how to use the SQL or ODBC features to connect to some other SQL backend, like MS SQL Server or Firebird.

    I've been experimenting with using a Unify/Gupta SQLbase database and an MS SQL Server Express database. Gupta SQLbase is used for a POS system I am experimenting with and MS SQL Server Express comes with MS Office Accounting, which I am also testing. When I begin setting up a new connection using Alpha DAO I have choices for DB2, MySQL, Oracle, MS SQL Server, and ODBC. I'm assuming that if my SQL database is not on the list I should use ODBC.

    So, for Gupta SQLbase I choose ODBC and then a list of the DSN connections comes up, one of which is my Gupta data source, previously set up by Gupta and double-checked by me using the ODBC manager. Next, I select Generic since Gupta is not on the list. Although, this is not obvious and I have no idea if this selection is important. There is also a choice for ODBC. I have achieved similar results with both selections.

    I then enter the correct username and password and click on the "test connection" button. I am greeted with a box that says "Succeeded" and the SQLBase Server window ends up on my taskbar. I'm thinking this is good. I have established a successful connection.

    I then save the connection in A5v8 and then try to attach a table. Here's where I get unexpected results. There is no table list. The only thing that shows is "<Custom SQL Query>". I remember on previous connection to Access seeing all the tables in the Access database being listed here. But now, with an ODBC connection to Gupta I don't get a table list. Is this normal or do I have a problem with the ODBC connection? Do I need help from Gupta or can Alpha Five handle this by itself?

    Now, I am assuming that since I have a choice to use a custom SQL query I could simply write an SQL statement and be able to return some data. But I haven't tried it yet. I need to brush up on my SQL before I try it. But I was hoping I could just choose tables and fields from a list and get the data over to A5. Will this be possible with any SQL database or do I need to use only databases on the drop down list provided by A5?

    Edit: I went back and tried the ADO tool and I was able to see a list of tables after successfully connecting. However, I could not edit/select the fields. May be a protection issue with the Gupta database. At any rate, it appears A5 needs help to connect to this SQL data. Will I be able to write the code I need to connect to any SQL databse or do I need the help of the SQL database vendor? I don't really understand how connecting by SQL/ODBC works. I thought all I needed was a DSN for the data source in question. Is there more?

    Thank you,
    Sean

    #2
    Re: Connecting to SQL backend with ODBC

    For Oracle, Access etc. you can use "Portable SQL" which brings up the query builder, but if "Native SQL" is selected - presumably by default the case if you use ODBC rather than one of the specifed DBs - the "Query Builder" button doesn't show up...

    You should still be able to just type SQL into the query field and save it, though... it is not a nice interface to be working in though, it might be easier to open the SQL editor from the control panel and try out/write your queries there, then just copy and paste them into the SQL query field when creating the ad hoc data source...

    Comment


      #3
      Re: Connecting to SQL backend with ODBC

      Thank you,

      What I am confused about is how ODBC/SQL connectivity works. I thought I would be able to use A5v8 to connect to any SQL database and use it like I would use the native DBF tables. It seems it is more complicated than I envisioned.

      I think the answer is that A5v8 will allow me to make the connection but I also need permission from the database vendor. Is this correct? Do I need to get some special driver, permission and password, for each SQL database I want to open in A5?

      Thanks,
      Sean

      Comment


        #4
        Re: Connecting to SQL backend with ODBC

        Originally posted by seaken64 View Post
        I think the answer is that A5v8 will allow me to make the connection but I also need permission from the database vendor. Is this correct? Do I need to get some special driver, permission and password, for each SQL database I want to open in A5?
        The vendor is the firm that makes the database software etc - the password details you need are those for the database you are wanting to connect to, usually your own or your company's. As the database administrator for the connection details (username, password etc.).

        If there is no client software/driver set up for an AlphaDAO connection, A5 will automatically bring up a messagebox that downloads the relevant driver for you, at least it does with Oracle. For ADO connections as far as I know, you need to install the driver yourself and set up the data source in the ODBC Data Source administrator window on each PC...

        Comment


          #5
          Re: Connecting to SQL backend with ODBC

          Also, the ODBC driver is specific to the database. So the Gupta/Unify database should have an ODBC driver that you can download.

          Comment


            #6
            Re: Connecting to SQL backend with ODBC

            Originally posted by Peter.Wayne View Post
            Also, the ODBC driver is specific to the database. So the Gupta/Unify database should have an ODBC driver that you can download.
            Ah yes, that's right, the ODBC connections need the appropriate driver too, even in AlphaDAO.

            What was quite odd for me was that, if I uninstalled the Oracle Client, A5 will happily connect to BOTH Oracle 8 (which isn't supported as such) AND Oracle XE and other supported newer versions. As soon as I installed the client and driver for Ora8, I got the prompt to download the InstantClient when trying to set up a connection to any Oracle database.

            Since I need the client for other apps. I had to trick A5 by copying the old Oracle dlls into the A5 program folder, and what do you know, it now happily talks to Oracle old and new, with the Oracle 8 Client and Oracle 8 ODBC driver installed.

            Comment

            Working...
            X