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. Connecting to DB from a Web Service

Connecting to DB from a Web Service

Scheduled Pinned Locked Moved C#
databasewinformscomhelp
8 Posts 3 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.
  • Z Offline
    Z Offline
    zaboboa
    wrote on last edited by
    #1

    Hi, I have a web service that references the DLL. Inside the DLL I make a connection to a database, and do some data manipulation. However, for some reason I can not establish the connection. (DLL is a COM object). On the other hand if I just use a simple windows forms application and reference the same DLL, I connect with no problems. It seems that I am missing some settings or something. Really need help. Thank you!

    C V 2 Replies Last reply
    0
    • Z zaboboa

      Hi, I have a web service that references the DLL. Inside the DLL I make a connection to a database, and do some data manipulation. However, for some reason I can not establish the connection. (DLL is a COM object). On the other hand if I just use a simple windows forms application and reference the same DLL, I connect with no problems. It seems that I am missing some settings or something. Really need help. Thank you!

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      What is the error? What exceptions are being thrown?

      Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog

      Z 1 Reply Last reply
      0
      • C Colin Angus Mackay

        What is the error? What exceptions are being thrown?

        Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog

        Z Offline
        Z Offline
        zaboboa
        wrote on last edited by
        #3

        The exception that it's throwing is the Time out exception. Thank you

        modified on Monday, June 9, 2008 10:12 AM

        1 Reply Last reply
        0
        • Z zaboboa

          Hi, I have a web service that references the DLL. Inside the DLL I make a connection to a database, and do some data manipulation. However, for some reason I can not establish the connection. (DLL is a COM object). On the other hand if I just use a simple windows forms application and reference the same DLL, I connect with no problems. It seems that I am missing some settings or something. Really need help. Thank you!

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Hi zaboboa If you can just post your code , it will be easy for us to help you

          Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

          Z 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            Hi zaboboa If you can just post your code , it will be easy for us to help you

            Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

            Z Offline
            Z Offline
            zaboboa
            wrote on last edited by
            #5

            Hi! Unfortunatelly I have no control over the DLL that I am using. The method in DLL will return the ADO connection object. It's working fine when I reference it from Windows Form Application (connection object is returned), and not fine (get the Timeout Exception) when referenced from Web Service running on my local machine. So, I guess my question is what is the difference in referencing components from Web Service and Windows Form application? Thank you.

            V 1 Reply Last reply
            0
            • Z zaboboa

              Hi! Unfortunatelly I have no control over the DLL that I am using. The method in DLL will return the ADO connection object. It's working fine when I reference it from Windows Form Application (connection object is returned), and not fine (get the Timeout Exception) when referenced from Web Service running on my local machine. So, I guess my question is what is the difference in referencing components from Web Service and Windows Form application? Thank you.

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #6

              hi man I understand your Problem. What you receive is the timeout in the Command object. I hear you say you have no Access to the DLL code. So that means you have little to do with that Problem. i will tell you what did the person who write the DLL missed. CommandObject.CommandTimeout = 0; Atleast microst Recomend it, that means it is infinite.There Shouldnt be a Difference. Thanks

              Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

              Z 1 Reply Last reply
              0
              • V Vimalsoft Pty Ltd

                hi man I understand your Problem. What you receive is the timeout in the Command object. I hear you say you have no Access to the DLL code. So that means you have little to do with that Problem. i will tell you what did the person who write the DLL missed. CommandObject.CommandTimeout = 0; Atleast microst Recomend it, that means it is infinite.There Shouldnt be a Difference. Thanks

                Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                Z Offline
                Z Offline
                zaboboa
                wrote on last edited by
                #7

                Thanks. How come it works when I call it from a Windows Form Application?

                V 1 Reply Last reply
                0
                • Z zaboboa

                  Thanks. How come it works when I call it from a Windows Form Application?

                  V Offline
                  V Offline
                  Vimalsoft Pty Ltd
                  wrote on last edited by
                  #8

                  Hi Remember there is a Difference Between Web and Windows.

                  Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                  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