Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. calling C# code from SQL Server procedure.

calling C# code from SQL Server procedure.

Scheduled Pinned Locked Moved C#
csharpquestiondatabasesql-serversysadmin
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pankazmittal
    wrote on last edited by
    #1

    Hi From SQL procedure, I need to call a .NET function (which is part of .NET assembly and loaded in SQL Server 2005). 1. What is the maximum length of STRING which can be passed as parameter? 2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects? Please advise. Thanks Pankaj

    S G A 3 Replies Last reply
    0
    • P pankazmittal

      Hi From SQL procedure, I need to call a .NET function (which is part of .NET assembly and loaded in SQL Server 2005). 1. What is the maximum length of STRING which can be passed as parameter? 2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects? Please advise. Thanks Pankaj

      S Offline
      S Offline
      Simon P Stevens
      wrote on last edited by
      #2

      pankazmittal wrote:

      1. What is the maximum length of STRING which can be passed as parameter?

      I wouldn't expect there to be a max. There is no limit on the size a string can be apart from the physical limit of how much memory you have available.

      pankazmittal wrote:

      2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects?

      Don't see any reason why not. Give it a try. Let me know what happens.

      Simon

      1 Reply Last reply
      0
      • P pankazmittal

        Hi From SQL procedure, I need to call a .NET function (which is part of .NET assembly and loaded in SQL Server 2005). 1. What is the maximum length of STRING which can be passed as parameter? 2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects? Please advise. Thanks Pankaj

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        pankazmittal wrote:

        1. What is the maximum length of STRING which can be passed as parameter?

        I don't know exactly, but it would be something like 2 or 4 million characters. If you have a 32 bit operating system, the limit would be that no process can use more than 4 GiB of memory.

        pankazmittal wrote:

        2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects?

        I don't see how you could create any object like than in T-SQL?

        Despite everything, the person most likely to be fooling you next is yourself.

        1 Reply Last reply
        0
        • P pankazmittal

          Hi From SQL procedure, I need to call a .NET function (which is part of .NET assembly and loaded in SQL Server 2005). 1. What is the maximum length of STRING which can be passed as parameter? 2. I only saw the samples of basic types (like int, string) but can we pass XML datatype or other complex custom objects? Please advise. Thanks Pankaj

          A Offline
          A Offline
          Atif Shahbaz
          wrote on last edited by
          #4

          Yes we can what you need to do is to add your assembly under the database programmability folder in assemblies and then call it in your query.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups