Join
Sign in
ComponentOne Community
Search Options
Search Everything
Search ActiveX
Home
WinForms
WPF
ASP.NET
Silverlight
SharePoint
Help Authoring
ActiveX
Windows Mobile
General
Visual Studio Extensions
Legacy
Marketing Blogs
Dev Tools
Evangelists
C1Announcements
More ...
Home
»
ActiveX
»
True DataControl
»
stored procedures (add new and deletes with TData control)
stored procedures (add new and deletes with TData control)
ActiveX
ActiveX controls
Get this RSS feed
Home
Forums
Files
Wiki
Details
1
Reply
0
Subscribers
1688
days old
Options
Subscribe via RSS
Send to friend
True DataControl
stored procedures (add new and deletes with TData control)
rated by 0 users
This post has
1 Reply |
0
Followers
Posted by
newsgroup_archive
on
1-19-2006 4:20 PM
rated by 0 users
stored procedures (add new and deletes with TData control)
Hi all,
I just inherited a VB6 project that uses a componentone controls for everything. There is one thing that is confusing the heck out of me. There is a tdata control that has the following setup:
DataMode: 0 - DataSource
CommandType: StoredProc
LockType: LockOptimistic
Connention is to a SQL database
The store procedure is a simple select query from one table. How does the tdata control able to add new rows and delete rows back to the database. There is no code specifing how this should be done. If the store procedure was something more complicated with joins and so forth, would how could add and delete rows?
Please help ... I'm starting to go mad
Sean
Click here to view the original newsgroup article
(read only).
Posted by
newsgroup_archive
on
1-20-2006 7:33 PM
rated by 0 users
Re: stored procedures (add new and deletes with TData control)
Alright, I did some testing today. I appears to me that the data control is smart enough to read the stored procedure and deduce what a suitable insert and update sql statement should be.
Please correct me if I'm wrong.
If the stored procedure returns a recordset from a temp table the data control won't work. I believe records sets based on multiple joins cannot update and insert with the data controls default functionality. Also if the record set does not contain all of the non nullable fields the insert will produces an error.
This control is pretty smart. I tried to trick with a procedure that returned a select statement with on join. I placed the child table first in my statement and the control still updated and inserted into the parent table. I didn't think it would catch that.
Happy coding,
s.tuck
"Sean"
wrote:
>
>Hi all,
>I just inherited a VB6 project that uses a componentone controls for everything. There is one thing that is confusing the heck out of me. There is a tdata control that has the following setup:
>DataMode: 0 - DataSource
>CommandType: StoredProc
>LockType: LockOptimistic
>Connention is to a SQL database
>
>The store procedure is a simple select query from one table. How does the tdata control able to add new rows and delete rows back to the database. There is no code specifing how this should be done. If the store procedure was something more complicated with joins and so forth, would how could add and delete rows?
>
>Please help ... I'm starting to go mad
>Sean
>
Click here to view the original newsgroup article
(read only).
Page 1 of 1 (2 items)