Hmm... that certainly could be the case.
I had no small amount of trouble getting the query to complete successfully, but I had though I finally had it down.
I used the Host -> SQL tool, with "Run as script" checked. It completed successfully, and everything *should* be there.
The script I wrote was one that I modified from the script that is automatically generated when you follow these directions.
I kept just about everything as it was, and added the fields that I needed.
I then did likewise for the VB, with some help from Mr. Washington's tutorial for the funtionality.
(N.B. I do *not* want to use Linq to achieve my result)
If you have any suggestions, they are certainly appreciated.
SQL script to follow...
(omitted segments for readability)
/** Create Stored Procedures **/
create procedure {databaseOwner}{objectQualifier}MIDW_GetPhoneGrids
@ModuleId int
as
select ModuleId,
ItemId,
Content,
CreatedByUser,
CreatedDate,
EmpName,
Terminal,
EmpNumber,
ExtNumber
from {objectQualifier}MIDW_PhoneGrid with (nolock)
left outer join {objectQualifier}Users on {objectQualifier}MIDW_PhoneGrid.CreatedByUser = {objectQualifier}Users.UserId
where ModuleId = @ModuleId
GO
create procedure {databaseOwner}{objectQualifier}MIDW_GetPhoneGrid
@ModuleId int,
@ItemId int
as
select ModuleId,
ItemId,
Content,
CreatedByUser,
CreatedDate,
EmpName,
Terminal,
EmpNumber,
ExtNumber
from {objectQualifier}MIDW_PhoneGrid with (nolock)
left outer join {objectQualifier}Users on {objectQualifier}MIDW_PhoneGrid.CreatedByUser = {objectQualifier}Users.UserId
where ModuleId = @ModuleId
and ItemId = @ItemId
GO
create procedure {databaseOwner}{objectQualifier}MIDW_AddPhoneGrid
@ModuleId int,
@Content ntext,
@UserID int,
@EmpName nvarchar (55),
@Terminal nvarchar (25),
@EmpNumber nvarchar (25),
@ExtNumber nvarchar (25)
as
insert into {objectQualifier}MIDW_PhoneGrid (
ModuleId,
Content,
CreatedByUser,
CreatedDate,
EmpName,
Terminal,
EmpNumber,
ExtNumber
)
values (
@ModuleId,
@Content,
@UserID,
@EmpName,
@Terminal,
@EmpNumber,
@ExtNumber,
getdate()
)
GO
create procedure {databaseOwner}{objectQualifier}MIDW_UpdatePhoneGrid
@ModuleId int,
@ItemId int,
@Content ntext,
@UserID int,
@EmpName nvarchar (55),
@Terminal nvarchar (25),
@EmpNumber nvarchar (25),
@ExtNumber nvarchar (25)
as
update {objectQualifier}MIDW_PhoneGrid
set Content = @Content,
CreatedByUser = @UserID,
CreatedDate = getdate(),
EmpName = @EmpName,
Terminal = @Terminal,
EmpNumber = @EmpNumber,
ExtNumber = @ExtNumber
where ModuleId = @ModuleId
and ItemId = @ItemId
GO
create procedure {databaseOwner}{objectQualifier}MIDW_DeletePhoneGrid
@ModuleId int,
@ItemId int
as
delete
from {objectQualifier}MIDW_PhoneGrid
where ModuleId = @ModuleId
and ItemId = @ItemId
GO