 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alexandre Guest
|
Posted: Mon Aug 02, 2004 4:04 pm Post subject: TADOStoredProc update |
|
|
Hi All,
I have a simple TADOStoredProc (Select cod, name from Table1) and
the"Edit" executes the following command in the SQL successfully (exec
sp_executesql
N'UPDATE "test".."table1" SET "name"=@P1 WHERE "cod"=@P2 AND "name"=@P3',
N'@P1 varchar(10),@P2 int,@P3 varchar(10)', 'john ', 5, 'xina'). But when I
have TADOStoredProc (Select Table1.cod, Table1.name, Table2.desc from
Table1, Table2 where Table1.cod = Table2.cod) and the "Edit" is not work!
(the same command is carried through without success)
Thanks,
Alex
|
|
| Back to top |
|
 |
Alexandre Guest
|
Posted: Mon Aug 02, 2004 7:55 pm Post subject: Re: TADOStoredProc update |
|
|
Hi All,
I have a TADOStoredProc (Select Table1.cod, Table1.name, Table2.desc from
Table1, Table2 where Table1.cod = Table2.cod)
In the truth, necessary to clarify some points.
1- I am using Delphi 7 and MS SQL the 2000
2- The "error" this in "DELETE", when erasing a register of table1 the
system to generate following command SQL
exec sp_executesql N'DELETE FROM "teste".."Table1" WHERE "cod"=@P1', N'@P1
int', 4
exec sp_executesql N'DELETE FROM "teste".."Table2" WHERE "cod"=@P1', N'@P1
int', 4
3-Although INSERT and EDIT only occur in table1, the DELETE always mentions
table1 and table2.
How to inform to delphi (ADO) to only use table1?
Thanks!
Alex
|
|
| Back to top |
|
 |
Ville Guest
|
Posted: Tue Aug 03, 2004 9:21 am Post subject: Re: TADOStoredProc update |
|
|
Alexandre wrote:
| Quote: | Hi All,
I have a TADOStoredProc (Select Table1.cod, Table1.name, Table2.desc from
Table1, Table2 where Table1.cod = Table2.cod)
In the truth, necessary to clarify some points.
1- I am using Delphi 7 and MS SQL the 2000
2- The "error" this in "DELETE", when erasing a register of table1 the
system to generate following command SQL
exec sp_executesql N'DELETE FROM "teste".."Table1" WHERE "cod"=@P1', N'@P1
int', 4
exec sp_executesql N'DELETE FROM "teste".."Table2" WHERE "cod"=@P1', N'@P1
int', 4
3-Although INSERT and EDIT only occur in table1, the DELETE always mentions
table1 and table2.
How to inform to delphi (ADO) to only use table1?
|
Use
TheDataSet.Properties['Unique Table'].value := 'table1';
|
|
| Back to top |
|
 |
Alexandre Guest
|
Posted: Wed Aug 04, 2004 12:21 pm Post subject: Re: TADOStoredProc update |
|
|
Hi Ville,
I am thankful for having helped me, now everything this functioning
correctly. But I have another doubt, where I can obtain information on the
properties of the table. As, for example, "Unique Table" that you he used.
Alex
"Ville" <noone (AT) nowhere (DOT) com> escreveu na mensagem
news:410f5929 (AT) newsgroups (DOT) borland.com...
| Quote: | Alexandre wrote:
Hi All,
I have a TADOStoredProc (Select Table1.cod, Table1.name, Table2.desc
from
Table1, Table2 where Table1.cod = Table2.cod)
In the truth, necessary to clarify some points.
1- I am using Delphi 7 and MS SQL the 2000
2- The "error" this in "DELETE", when erasing a register of table1 the
system to generate following command SQL
exec sp_executesql N'DELETE FROM "teste".."Table1" WHERE "cod"=@P1',
N'@P1
int', 4
exec sp_executesql N'DELETE FROM "teste".."Table2" WHERE "cod"=@P1',
N'@P1
int', 4
3-Although INSERT and EDIT only occur in table1, the DELETE always
mentions
table1 and table2.
How to inform to delphi (ADO) to only use table1?
Use
TheDataSet.Properties['Unique Table'].value := 'table1';
|
|
|
| Back to top |
|
 |
Ville Guest
|
Posted: Thu Aug 05, 2004 6:05 pm Post subject: Re: TADOStoredProc update |
|
|
Alexandre wrote:
| Quote: | Hi Ville,
I am thankful for having helped me, now everything this functioning
correctly. But I have another doubt, where I can obtain information on the
properties of the table. As, for example, "Unique Table" that you he used.
"Ville" <noone (AT) nowhere (DOT) com> escreveu na mensagem
news:410f5929 (AT) newsgroups (DOT) borland.com...
Use
TheDataSet.Properties['Unique Table'].value := 'table1';
You can find information about TAdoDataSet.Properties from Microsoft ADO |
documentation.
A good place to start is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmscadoapireference.asp
Ville
|
|
| Back to top |
|
 |
Alexandre Guest
|
Posted: Mon Aug 09, 2004 1:00 pm Post subject: Re: TADOStoredProc update |
|
|
I thank its aid again!
"Ville" <noone (AT) nowhere (DOT) com> escreveu na mensagem
news:411276e7 (AT) newsgroups (DOT) borland.com...
| Quote: | Alexandre wrote:
Hi Ville,
I am thankful for having helped me, now everything this functioning
correctly. But I have another doubt, where I can obtain information on
the
properties of the table. As, for example, "Unique Table" that you he
used.
"Ville" <noone (AT) nowhere (DOT) com> escreveu na mensagem
news:410f5929 (AT) newsgroups (DOT) borland.com...
Use
TheDataSet.Properties['Unique Table'].value := 'table1';
You can find information about TAdoDataSet.Properties from Microsoft ADO
documentation.
A good place to start is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmscadoapireference.asp
Ville
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|