Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 936745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:21:47+00:00 2026-05-15T21:21:47+00:00

StackOverflow – I’m still trying to deploy this site, but with every problem I

  • 0

StackOverflow – I’m still trying to deploy this site, but with every problem I solve, another arises. Anyways – I’ve set up the database at my hosting to allow remote connections, and it is running Sql Server 2005. On my development machine, I am working with Sql Server 2008.

I’ve installed the asp.net schema on my hosted database, and have created several users from the ASP.NET web administration interface, as well as tested that the login works. Running the application locally with the remote connection string nets the same results. However – I’m able to run my scripts and generate my tables and stored procedures without errors – but when the site is run I get the following error on all of my .aspx pages that try to access a stored procedure:

Server Error in '/' Application.
Incorrect syntax near 'LoadProfileData'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'LoadProfileData'.

Source Error:

Line 62:             adapter.SelectCommand.Parameters.Add("@ProfessionalName", SqlDbType.VarChar).Value = professionalName;
Line 63:             DataSet profile = new DataSet();
Line 64:             adapter.Fill(profile, "Profile");
Line 65:             return profile;
Line 66:         }

Is this a possible Sql 2005 vs 2008 issue? I’m hoping someone else has seen this issue in a similar scenario and can point me in the right direction. The server is running asp.net 2.0, 3.0 and 3.5 and IIS 7.0.

Stored Procedure:

-- =============================================
-- Create date: <July 2010>
-- Description: <Create default Professional Profile>
-- =============================================
Drop procedure CreateDefaultProfile
GO
Create procedure CreateDefaultProfile(@UserName varchar(256))
as
    declare @ProfessionalID uniqueidentifier
    set @ProfessionalID = (select UserId from aspnet_Users where UserName = @UserName)


    declare @email varchar(256)
    set @email = (select Email from aspnet_Membership where UserId = @ProfessionalID)

    insert into Professional(ProfessionalID, Name, Email, Phone, TypeID, DisplayPictureUrl, ProfileHeader, ProfileSubHeader, ProfileContent, ServicesHeader, ServicesContent)
    values (@ProfessionalID, '', @email, '', '', 'css/img/profilepicture_default.jpg', '', '', '', '', '')


    GO

    -- exec CreateDefaultProfile 'Mounir'
    -- select * from Professional

Data Access Layer Method:

//"Data Source=localhost;Initial Catalog=MHNProServices;Integrated Security=SSPI"
        const string ConnectionString =
            "Data Source=mhnproservices.db.5322869.hostedresource.com; Initial Catalog=mhnproservices; User ID=mhnproservices; Password='***********'";

        internal static void CreateDefaultProfile(string professionalName)
        {
            SqlConnection conn = new SqlConnection(ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter("CreateDefaultProfile @ProfessionalName", conn);
            adapter.SelectCommand.Parameters.Add("@ProfessionalName", SqlDbType.VarChar).Value = professionalName;

            conn.Open();
            adapter.SelectCommand.ExecuteNonQuery();
            conn.Close();
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:21:48+00:00Added an answer on May 15, 2026 at 9:21 pm

    I needed to add exec before the procedure call. Is that just a syntax difference between 2005 and 2008? Anyways, the following works:

     SqlDataAdapter adapter = new SqlDataAdapter("exec CreateDefaultProfile @ProfessionalName", conn);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

StackOverflow - I'm still trying to deploy this site, but with every problem I
stackoverflow community. I have a problem that I've been trying to solve since a
Hello stackoverflow people! I've got a problem which I haven't been able to solve
StackOverflow is telling me this is a subjective question, but I think it's a
Stackoverflow community. I found out that WSO2 community can be contacted on this site,
A stackoverflow search will result in several postings that contain similar titles, but this
Many StackOverflow posts and other online forums have questions similar to this, but none
stackoverflow forum member I am having some problem with a certain report designed using
StackOverflow'ers, I realize the new @mentions is a very new feature to facebook, but
stackoverflow, I am experimenting with implementing OpenID in my existing site. I have looked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.