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  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


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
12959 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



DotNetNuke Project UserDefinedTable
DotNetNuke Project XML/XSL
 
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.

 


TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk
Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com

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