Search found 20 matches

by Balaji
Tue 01 Apr 2008 16:20
Forum: Oracle Data Access Components
Topic: Problem while installing ODAC components
Replies: 1
Views: 2268

Problem while installing ODAC components

Scenario Environment
Database : OS : Linux RHEL 4 Advanced Server 64 bit
DB : Oracle 10g R2 64 bit
App Machine : OS : Windows Server 2003 R2 SP1 64 bit
Db Client : Oracle 10g R2 64 bit
All the machine hardware are 64 bit.

Over this environment , in the App machine we are installing 64 bit ODAC 11g [ODP.NET] as it supports distributed transactions across multiple resource managers.

The problems faced during installation are,
1. Oracle MTS Service is getting corrupted and is not able to start during installation or after restart of the machine involved.
Error Message : Unable to start the service in a timely manner.
2. Unable to load assembly Oracle.Web from machine.config [under health monitoring provider] .
Error Message : Could not load file or assembly 'Oracle.Web'
When commented from machine.config , it was giving the following error ,
Error Message : Could not load file or assembly 'Oracle.DataAccess'. An attempt was made to load a program with an incorrect format.

Please advise us on any patches or any configuration level changes to be done to overcome the above mentioned errors and have a successfull installation.
Moreover , please forward us the compatibility matrix for the ODTwithODAC1110620 64 bit.
by Balaji
Mon 23 Jul 2007 09:15
Forum: SQL Server Data Access Components
Topic: problem while using Locate function of TMSQuery
Replies: 10
Views: 6996

problem while using Locate function of TMSQuery

Hi,

I am using licensed version (3.80) of SDAC components.

I am facing a problem while using Locate function of TMSQuery of SDAC component.

Data base Table has column ‘groupno’. Value of groupno could be NULL
I am doing locate on column ‘groupno’.
Code reference is as follows...

Code: Select all

MSQuery1.Locate('groupno',MSQuery2.fieldbyname('groupno').AsString,[])
When MSQuery2.fieldbyname('groupno').AsString = NULL locate fails even though there is record in database where groupno = NULL.

Can you please help me to solve this problem?

Regards
Balajee
by Balaji
Mon 16 Jul 2007 12:46
Forum: SQL Server Data Access Components
Topic: Error When trying to perform edit operations
Replies: 7
Views: 4026

Thanks for the reply,
But my problem got solved with a different Solution.

The FetchAll Property of SDAC query components which i was using was set to False. I have set the Property to TRUE and my problem got solved automatically.
by Balaji
Fri 13 Jul 2007 12:29
Forum: SQL Server Data Access Components
Topic: Error When trying to perform edit operations
Replies: 7
Views: 4026

Error When trying to perform edit operations

Hi,

I am using Licensed version(3.80) of SDAC components.

I am facing a problem when performing Certain Edit(Update and Delete) Operations. This problem is specific only in certain cases.

The sequence of operations on database will as follows:
1) There will certain set of Select Operations to validate the data user has entered
2) There will be certain Select Operations to determine whether user is in Edit mode or Add Mode
3) When the user is in Edit mode, he performs certain modifications to the data and accordingly dataset is updated.
4) Now when i Start the transaction to update the changes of dataset to the database i am getting the following message

"Error: Cannot create new transaction because capacity was exceeded."

I know that there can be some problem in my Code but i tried out various options and i couldnt find any success.

I am using Query an UpdateSQL components of SDAC for this purpose.

Can any one help me out in solving my problem.

Regards
Balajee
by Balaji
Tue 15 May 2007 11:16
Forum: SQL Server Data Access Components
Topic: Obtaining the Query Execution plan through SDAC components
Replies: 1
Views: 1611

Obtaining the Query Execution plan through SDAC components

Hi,

Is there any way to obtain the query execution plan of the queries fired on the database through front end using SDAC components !!

I am using liecensed 3.80 version of SDAC components.

Regards
by Balaji
Thu 03 May 2007 10:13
Forum: SQL Server Data Access Components
Topic: Problem with SDAC Query component used along with ClientDataSet
Replies: 1
Views: 2066

Problem with SDAC Query component used along with ClientDataSet

Hi,

I am using SDAC 3.80 liecensed version of components in one of my migration projects.

I am having following coponents on my form - ClientDataSet, Provider, DataSource and query component attached to each other. I also have a Db Grid, and the data source of the DB grid is the data source component which i have on the form.

Now on Click of a button i am setting the ClientDataset's Active property to True. Now i am trying to add a new row to the dataset. At this time i am filling some fields of the new row so that user dont need to enter them. But i am not filling all the mandatory fields. But without filling all the mandatory fields i am trying to append the ClientDataSet and trying to add another row as it is necessary.
I am not filling all the mandatory fields as i am expecting the end user to fill them.

Now the problem is when i am trying to Append the clientDataSet for adding the Second row SDAC components do a Post which is Causing an error. The reason for the error is all the mandatory fields required for doing post are not filled.

Now can i have solution for this. Can i stop SDAC's components from doing post during appending the DataSet?

Regards
by Balaji
Tue 17 Apr 2007 13:15
Forum: SQL Server Data Access Components
Topic: Problem with StrictUpdate property of class "TDADataSetOptions" in DBAccess file
Replies: 1
Views: 2632

Problem with StrictUpdate property of class "TDADataSetOptions" in DBAccess file

Hi,

If we see the help for StrictUpdate property of class "TDADataSetOptions" in DBAccess file, it says:

"StrictUpdate TCustomDADataSet raises exception when number of the updated or deleted records does not equal to 1. Setting this option also causes an exception if RefreshRecord procedure returns more than one record. The exception does not occur when you use non-SQL block."

In our application, there is an instance, where on clicking the delete button, all the records displayed in a grid are deleted. In that scenario, the FUpdateQuery.RowsAffected count is greater than 1 and in the following condition of 'PerformSQL' function of the 'DBAcess.pas' file :
------------------------------------------------------------------------------------
" if FOptions.StrictUpdate and
//(Command.SQLType in [SQL_INSERT,SQL_UPDATE,SQL_DELETE]) and /// for ODAC
((FRowsAffected = 0) or (FRowsAffected > 1))
then
DatabaseError(Format(SUpdateFailed, [FRowsAffected])); "
-----------------------------------------------------------------------------------
is giving an error Message.

This is happening because the parameter "StrictUpdate " is set to true in the constructor of class "TDADataSetOptions"
If we change the value to 'false' in the construtor, the error is not raised and application is running fine.

Will setting "StrictUpdate " to false in the constructor can have severe implications on other db operations ?

Please instruct Us regarding the same and any other possible solutions other than this.

Waiting for your clarification on the same,

Regards
Balajee
by Balaji
Tue 17 Apr 2007 13:05
Forum: SQL Server Data Access Components
Topic: Problem with CursorType while Opening Query
Replies: 2
Views: 2020

Thank you, It Solved My Problem.
by Balaji
Tue 17 Apr 2007 09:58
Forum: SQL Server Data Access Components
Topic: Problem with CursorType while Opening Query
Replies: 2
Views: 2020

Problem with CursorType while Opening Query

Hi,

I am facing problem cursor type when i am using SDAC components.

In my Project i have TMainMenu. I have MainMenu item and Five submenu item for the main menu. I have a MainMenu click event. In the menuclick event i have try..finally block. In the "try" block i am opening a query component and based on the dataset values i am changing the captions of the submenu's. In the "Finally" block i am closing the query.

The code in the MenuClick event is as below:
--------------------------------------------------------------------------------
try
Screen.Cursor := crDefault;
MsQuery1.Close;
MsQuery1.Open;
test := Sender As TMenuItem;

for i := 0 to test.Count - 1 do
begin
test.Items.Visible := False;
test.Items.Tag := 0;
end;
i := 0;

while (not MsQuery1.EOF) and (i < 5) do
begin
with test.Items do
begin
Caption := 'Success';
Visible := True;
Tag := 1;
end; { with }

Inc(i);

MsQuery1.Next;
end; {while }

finally
MsQuery1.Close;
Screen.Cursor := crDefault;
end; { try }
--------------------------------------------------------------------------

Now the Problem i have is the cursor is getting changed into crSQLwait state even though i am setting to crDefault before and after the query opening and closing.

Note: I have added sdacvcl to the uses clause of my unit as i need it for other purposes.

Can i know the reason for this and the solution to the same.

I am using SDAC 3.80 licensed version and Delphi 7 Version. Data base Version is SQL Server 2005.

Regards
balajee
by Balaji
Wed 13 Dec 2006 07:03
Forum: SQL Server Data Access Components
Topic: How to get the Identity Value from ClientDataSet:
Replies: 2
Views: 2891

Thanks for the reply.
I do know that it is not a restriction of SDAC...

My intention of posting this here is for an alternate solution so that i can get problem solved.
Is there any possible way to obtain Identity value in my case ?? if so please let me know...
I am working on a Migration project and i cannot completely replace the existing components as it is not part of our design..
so if u can provide me any alternative way of obtaining Identity Value it will be of great help to me..

Thanks in Advance...
Balajee
by Balaji
Tue 12 Dec 2006 10:06
Forum: SQL Server Data Access Components
Topic: How to get the Identity Value from ClientDataSet:
Replies: 2
Views: 2891

How to get the Identity Value from ClientDataSet:

Hai,

I have TmSquery(Query1), TProvider (Provider1), TClienDataSet (ClientDataSet1) and a TDataSource components on the form.Query1 is attached to the Provider1 which is inturn attached to the ClientDataset1. This ClientdataSet1 is attached as the dataset to the DataSource component.
I am doing a normal insert operation into a table having Identity column using the ClientDataSet1 component.
I am doing the following piece of code:

ClientDataSet1.Insert;
ClientDataSet1.Fieldbyname('').AsInteger := 5;
ClientDataSet1.post;

Now, the table in which i am posting a record is having Identity Column. Now i want to have the identity Value that got generated so that i can pass it for inserting data into child tables. How to obtain the Identity Column value here ?

Note: I have already looked into some Identity Column queries that were posted in the group and did some things like, setting the autogenrateValue property to arAutoinc, setting the ReturnParams Option to TRUE etc..
But i was unable to write "Set :Columnname = SCOPE_Identity" beacuse i dont have any insert statement at all as i am using ClientDataSet.


Thanks in Advance

Regards
Balajee
by Balaji
Tue 28 Nov 2006 15:38
Forum: SQL Server Data Access Components
Topic: How to Pass External Values to Parameters of TMSUpdateSQL component
Replies: 1
Views: 1876

How to Pass External Values to Parameters of TMSUpdateSQL component

Hi,

I am using Liecensed Version of SDAC components.

I have Query Component and in the SQL property of it i have "Select" statement. Using this Select i am selecting 5 Columns Unique Values. For the UpdateObject property of the Query Component i have a TMsUpdateSQL component attached. In this TMsUpdateSQL component i have insert statement, which will insert a row in to table having 7 Columns. Of these 7 Columns, 5 Columns values can be obtained by Opening the Query component i.e setting the Query.open. For the remaining two columns i want to set the values from Code.

I want to know, how to pass values to parameters of TMsUpdateSQL component using SDAC components. is there anything like parambyname property which can be used to pass parameters to TMsUpdateSQL compoenent?

Note: I cannot use SQLInsert bcos SQLInsert has a limitatation of "Parameter names should be same".


If u can explain me using an example, it will be help ful to me.

Thanks in Advance.
by Balaji
Wed 22 Nov 2006 05:52
Forum: SQL Server Data Access Components
Topic: Unable to Override parameters of Query component at runtime
Replies: 7
Views: 3138

Sorry, i already have this solution..and it will not work at all for me...

I feel this as a limitation of SDAC of components...because there so many other DataAccess components which are supporting the same.

Is there any document which will help me to understand, which property is "meant" for what purpose apart from the documention of SDAC?

This is very much needed for me as it will help me a lot in using these components.
by Balaji
Fri 17 Nov 2006 12:29
Forum: SQL Server Data Access Components
Topic: Unable to Override parameters of Query component at runtime
Replies: 7
Views: 3138

Can You Suggest me any Alternative Way of Achieving the Same with SDAC components...
by Balaji
Thu 16 Nov 2006 13:34
Forum: SQL Server Data Access Components
Topic: Unable to Override parameters of Query component at runtime
Replies: 7
Views: 3138

Unable to Override parameters of Query component at runtime

I think, you havent got my question:
Let me explain again in a simpler way, with simple code:


I have a small delphi project in which there is a single form and a Unit of it.
On the Form i have placed a Connection component, Two Query components( All SDAC Components) a Data Source and a button.

For Connection component i have set the connection string required.
For Query1 following are the properties set:
MasterSource = DataSource1
SQL = 'insert into employee(inso,categ,play,tet,rtuy)
values (:inso,:categ,:play,:tet,:rtuy)'

For DataSource DataSet Property is Set to Query2.

For Query2 following Properties were set:
SQL = select inso,categ,play,tet,rtuy from employee where inso = 'TEST', categ = 'HAI', play = 'CRIC'
( Above Query returns only one row in my defined database as insco,categ,play column combination is defined as Unique)



Now the Source Code written in my unit is as below:

In the FormCreate Event:

MedicConnection1.Connected := True;

In the ButtonClick Event:

Query2.Open;
Query1.ParamByName('inso').AsString := '11';
Query1.ParamByName('categ').AsString := 'AAA';
Query1.ParamByName('play').AsString := 'STND';
Query1.Execute;

Now when i execute the above code i am getting error in the buttonclick event when Execute line is encountered, there is an error saying that unique
Key is voilated.

This is because the values passed to insert statement are TEST,HAI and CRIC but not the values in the button click event.

Please provide me a proper answer, whether there any problem in my approach. Also please tell me whether this will work at all or not with SDAC ??

Other information required for you:
DataBase : SQLSERVER 2005
Delphi Version 7
SDAC Version : 3.80 ( Unlimited Developer liecensed Version)