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 1083033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:22:48+00:00 2026-05-16T22:22:48+00:00

What SqlDbType enumeration should I use when my column is the Geography type? I’m

  • 0

What SqlDbType enumeration should I use when my column is the Geography type? I’m using MS SQL Server 2008 R2.

This is what I’m looking for specifically:

// ADO.net - what do I use for the SqlDbType when it's defined 
// as Geography in the stored proc
SqlCommand command = new SqlCommand();
command.CommandText = "dbo.up_Foobar_Insert";
command.CommandType = CommandType.StoredProcedure;

command.Parameters.Add("@SomeGeographyType", SqlDbType.????);
  • 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-16T22:22:49+00:00Added an answer on May 16, 2026 at 10:22 pm

    Update

    Try this:

    //define parameter
    command.Parameters.Add("@shape", SqlDbType.NVarChar);
    //
    //code in between omitted
    //
    //set value of parameter
    command.Parameters["@shape"].Value = feature.Geometry.AsText();
    

    Taken from Inserting SQL 2008 Geometry With a SqlCommand

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What value in the SqlDbType enumeration should I use for the numeric T-SQL data
I am simply trying to call a store procedure (SQL Server 2008) using C#
I have a column called CreateDate (DateTime) in table1 in SQL Server 2008. With
I am updating the sql server 2005 database using batch update, as shown below
I'm looking to constrain a type parameter to SqlDbType for a generic factory method.
I have a SQL Server database, and I want to store in image type
Im importing a csv to my sql server table using the following code SqlCommand
I got this parameter: $objDbCmd.Parameters.Add(@telephone, [System.Data.SqlDbType]::VarChar, 18) | Out-Null; $objDbCmd.Parameters[@telephone].Value = $objUser.Telephone; Where the
using System.Data; using System.Data.SqlClient; I am using a SqlCommand cmd.Parameters of SqlDbType.DateTime to create
I'm trying to call a parameterized stored procedure from SQL Server 2005 in my

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.