R
ryguy7272
Conceptually, I understand what needs to be happen, but technically, I don’t
really know how to do it. Here is my Select statement:
SELECT tblEvents.Event, tblPubs.Name, tblPubs.Address, tblPubs.City,
tblPubs.State, tblPubs.OnDate FROM tblPubs INNER JOIN tblEvents ON
tblPubs.NeighborhoodID = tblEvents.NeighborhoodID WHERE (tblEvents.Event =
@Event)
That works just fine!! Items in my GridView (I'm working in SQL Server) are
updated based on what is selected from a DropDownList. Again, that part
works fine. Now, I am trying to add a few features to allow a particular
user (who logs into his account through a login form) to Insert, Update, and
Delete records. That’s what these controls are for, right. The user can do
this completely through a web browser, when the ASP.NET project is on the
server, as opposed to localhost, right
My question is, how would I design the SQL to allow the user to Insert (and
add ‘Event’, ‘Name’, ‘Address’, ‘City’, ‘State’, and ‘OnDate’)?
Similarly, how would I set up the SQL to allow this user to Update the
records and Delete the records? The tblEvents has the following Fields:
[Name] ,[Address] ,[City] ,[State] ,[NeighborhoodID] ,[ID] and ,[OnDate].
The tblEvents had the following Fields: [Event] and [NeighborhoodID].
For my Update statement, the following seems to make sense to me, but it is
not working:
UPDATE tblPubs
SET Event=@Event, Name=@name, Address=@Address, City=@City, State=@State,
OnDate=@OnDate
WHERE Event <> Null, Name <> Null, Address <> Null, City <> Null, State <>
Null, OnDate <> Null;
Please help with the Update, insert, and Delete.
Thanks,
Ryan--
really know how to do it. Here is my Select statement:
SELECT tblEvents.Event, tblPubs.Name, tblPubs.Address, tblPubs.City,
tblPubs.State, tblPubs.OnDate FROM tblPubs INNER JOIN tblEvents ON
tblPubs.NeighborhoodID = tblEvents.NeighborhoodID WHERE (tblEvents.Event =
@Event)
That works just fine!! Items in my GridView (I'm working in SQL Server) are
updated based on what is selected from a DropDownList. Again, that part
works fine. Now, I am trying to add a few features to allow a particular
user (who logs into his account through a login form) to Insert, Update, and
Delete records. That’s what these controls are for, right. The user can do
this completely through a web browser, when the ASP.NET project is on the
server, as opposed to localhost, right
My question is, how would I design the SQL to allow the user to Insert (and
add ‘Event’, ‘Name’, ‘Address’, ‘City’, ‘State’, and ‘OnDate’)?
Similarly, how would I set up the SQL to allow this user to Update the
records and Delete the records? The tblEvents has the following Fields:
[Name] ,[Address] ,[City] ,[State] ,[NeighborhoodID] ,[ID] and ,[OnDate].
The tblEvents had the following Fields: [Event] and [NeighborhoodID].
For my Update statement, the following seems to make sense to me, but it is
not working:
UPDATE tblPubs
SET Event=@Event, Name=@name, Address=@Address, City=@City, State=@State,
OnDate=@OnDate
WHERE Event <> Null, Name <> Null, Address <> Null, City <> Null, State <>
Null, OnDate <> Null;
Please help with the Update, insert, and Delete.
Thanks,
Ryan--