Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-09-15 : 08:35:59
|
| Svitlana writes "Hello, guys!Here is my problem. In SQL Server 2000 I created a stored procedure called sp_allocation which joins 3 tables. I have a form which uses this stored procedure as a record source. I would like to be able to update one of the tables used in the join in my stored procedure through the form. I am not able to set the Unique Table Property however, as its list is empty. If I type the name of the table, the following message is displayed:" The text you entered is not an item in the list".Here is the code for my stored procedure:ALTER PROCEDURE dbo.sp_allocation (@trade_id INT, @broker nvarchar(20)= NULL )AS BEGIN SELECT Trades.tradeID, Broker, Trades.Account, symbol, Shares, actualAllocatedShares, actualTradeDate FROM Accounts INNER JOIN (Trades INNER JOIN TradeHeader ON Trades.tradeId = TradeHeader.tradeID) ON Accounts.Account = Trades.Account WHERE Trades.tradeID = @trade_id AND Broker = IsNULL(@broker, Broker)ENDThanks in advance for you help!Svitlana" |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-09-15 : 19:43:36
|
| You're asking for trouble trying to do this in Access. Updating a joined query is a bit unreliable IMHO. You may be better off (certainly more reliable) using either linked sub-forms or disconnected forms (i.e. where you write all the read/write code yourself rather than rely on Access).If you must proceed along this path, you might want to modify your joins so Access recognises them.eg. Accounts INNER JOIN Trades ON Accounts.Account = Trades.Account INNER JOIN TradeHeader ON Trades.tradeId = TradeHeader.tradeID |
 |
|
|
|
|
|
|
|