Solved

SDAC Devart use with Delphi 2007

Posted on 2011-02-22
9
933 Views
Last Modified: 2012-05-11
Hi,

I am not new to programming but I started on a new project using SDAC drivers to access a SQL database.  What I need to know (as I have been unable to find out in all the help and demo programs) is the following:

I wish to access one table within one database on a SQL server to edit 2 fields on a form.  I have the form created and have tried many combinations of TMSConnection,  TMSDataSource, TMSTable and some others.  However, I can not find a way to obtain the correct combination of components to connect to this very simple table.

What components do I need and in which order to effect a simple edit form with a navigation bar at the top?

I did say it was a newbie question!

Best regards,

Bruce
0
Comment
Question by:Bruce-Dev
  • 6
  • 3
9 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 34950466
Use TMSQuery component

TMSQuery
Uses SQL statements to retrieve data from SQL Server table or tables and supply it to one or more data-aware components through a TDataSource component.
Provides flexible update of data.


SDAC Component List
http://www.devart.com/sdac/components.html#tmsquery
0
 

Author Comment

by:Bruce-Dev
ID: 34950664
I have tried putting TMSQuery on the form and there is no option to connect to a SQL database, select a table or authenticate.  There must be other components to add.  I have read the link before and again now.   All this does is explain what each component is for.

I need to know which component I need to connect to the SQL and which component I need to connect the form components to the SQL source.  Either the documents are missing this basic detail or I have missed some simple step.

When you start from nothing but a form what is required to access data in a simple 2 field table?

Best regards,

Bruce
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 34950793
TMSConnection: to connect to your SQL database (controls db connection)
TMSQuery: dataset component to query and update database;
TMSDatasource: interface between TMSQuery and your data-aware controls

SDAC compiled demo
http://www.devart.com/sdac/download.html
http://www.devart.com/sdac/sdacdemo.zip
0
 
LVL 19

Expert Comment

by:Thommy
ID: 34950802
STEP 1: Use TMSConnection to connect to your database
STEP 2: TMSQuery has a connection property, which you must set to your TMSConnection


0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Bruce-Dev
ID: 34950864
Thommy,

Okay - I have my TMSConnection that can link to my SQL data base.  I have my TMSQuery linked to my TMSConnection and TMSDataSource that is linked to my TMSQuery.  My edit components are linked to my DataSource.  However, where do I specify which table to use?

Best regards,

Bruce
0
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 500 total points
ID: 34950945
Also download SDAC CHM documentation for further help...

CHM documentation
http://www.devart.com/sdac/download.html
http://www.devart.com/sdac/sdacchm.zip

From the SDAC compiled demo check query.pas to see how it works...

0
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 500 total points
ID: 34950970
Now you have to provide a SQL statement in property TMSQuery.SQL, which executes when Open method is called...

for example: TMSQuery.SQL:='SELECT * FROM Table1';
0
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 500 total points
ID: 34951145
Please use help file SDAC.CHM to learn about the SDAC components and their properties and methods...
TMSQuery-Properties.jpg
0
 

Author Closing Comment

by:Bruce-Dev
ID: 34951334
Thommy,

Many thanks for your help.  I can now see the logic once the steps are clear.  It might be me but I could not obtain a clear indication from the help files which modules were required to get started.

Best regards,


Bruce
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now