Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't update SQL table
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Can't update SQL table
Environment versions
Environment:
ASP.NET
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00984795
Message ID:
00984795
Views:
61
Kevin,

I am trying to update a SQL table and receive the following error:

Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.

This business object for this table, is set up the same as the rest of my business objects. I just added this table this morning. The table name is Aprvl, and the primary key is the identity column. This is the command that it is choking on:

this.oApproval.SaveDataSet(this.dsApproval,"Aprvl","PMR");

public DataSet GetAllApprovals(int PMR_Num)
{
mmDataAccessBase dao = this.GetDataAccessObject();
IDbDataParameter param1 = dao.CreateParameter("@PMR_Num", PMR_Num);
dsApproval = this.GetDataSet("Select * FROM Aprvl WHERE PMR_Num = @PMR_Num", param1);
return dsApproval;
}

I hope you have some insight into this. I'm pulling my hair put.
Bill Benton
Senior Systems Analyst
Nuvell Financial Services
Reply
Map
View

Click here to load this message in the networking platform