Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Having trouble with custom module and stored procedures
Previous Previous
 
Next Next
New Post 2/1/2006 6:25 PM
User is offline Jarrette Schule
40 posts
10th Ranked


Having trouble with custom module and stored procedures 
Ok, I'm trying to add a stored procedure using this tutorial ...
http://www.codeproject.com/aspnet/Creating_A_DNNModule.asp#CreateStoredProcedure

I have modified the script to reflect my table, here it is...


CREATE PROCEDURE {databaseOwner}
   [{objectQualifier}NN_Biz_Delete]
(
@Biz_ID int
)
AS
DELETE FROM {objectQualifier}NN_Biz
WHERE (Biz_ID = @Biz_ID)
RETURN
GO
CREATE PROCEDURE {databaseOwner}
   [{objectQualifier}NN_Biz_GetAll]
(
@ModuleID int
)
AS
SELECT Biz_ID, ModuleID, Biz_Name, Biz_Category, Zip, Address, Web_Link, Phone1, Fax, Date_Start, Date_End, Date_Entered, Author, NHood_ID, Email
FROM {objectQualifier}NN_Biz
WHERE (ModuleID = @ModuleID)
order by Biz_Name DESC
RETURN
GO
CREATE PROCEDURE {databaseOwner}
   [{objectQualifier}NN_Biz_Insert]
(
@ModuleID int,
@Biz_Name nvarchar(50),
@Biz_Category nvarchar(50),
@Zip nchar(5)
)
AS
INSERT INTO {objectQualifier}NN_Biz
(ModuleID, Biz_Name, Biz_Category, Zip, Date_Entered)
VALUES (@ModuleID,@Biz_Name,@Biz_Category,@Zip,getdate())
RETURN
GO
CREATE PROCEDURE {databaseOwner}
   [{objectQualifier}NN_Biz_Update]
(
@Biz_ID int,
@Biz_Name nvarchar(50),
@Biz_Category nvarchar(50),
@Zip nchar(5),
@Date_Entered datetime
)
AS
UPDATE {objectQualifier}NN_Biz
SET Biz_Name = @Biz_Name, Biz_Category = @Biz_Category,
    Zip = @Zip, Date_Entered = @Date_Entered
WHERE (Biz_ID = @Biz_ID)
RETURN
GO


I am getting error messages saying...

System.Data.SqlClient.SqlException: Invalid column name 'GO'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE PROCEDURE dbo. [NN_Biz_Delete] ( @Biz_ID int ) AS DELETE FROM NN_Biz WHERE (Biz_ID = @Biz_ID) RETURN GO

Any Ideas where I am going wrong?

Here is my table which is called NN_Biz
1    Biz_ID    int    4    0
0    ModuleID    int    4    0
0    Biz_Name    nvarchar    50    0
0    Biz_Category    nvarchar    50    0
0    Zip    nchar    5    0
0    Address    nvarchar    50    0
0    Web_Link    nvarchar    50    1
0    Phone1    nchar    10    0
0    Fax    nchar    10    1
0    Date_Start    datetime    8    1
0    Date_End    datetime    8    1
0    Date_Entered    datetime    8    0
0    Author    nvarchar    50    0
0    NHood_ID    char    10    0
0    Email    nvarchar    50    1

 
New Post 2/2/2006 1:10 AM
User is offline Sebastian Leupold
13031 posts
www.deutschnetnuke.de
1st Ranked












Re: Having trouble with custom module and stored procedures 
pay attention on the character coding of your script file and add blank lines after each go.
Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Having trouble with custom module and stored procedures
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com
Sunset Hill Solutions - Consulting and Development
We offer general DNN consulting services - including custom module development and commercial module integration/setup.
www.sunsethill.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP