'Connection String not work'..

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 'Connection String not work'..

    I have this code looking at a registered dll, but i keep getting..
    Object doesn't support this property or method: 'ConnectionString'
    line 9

    <%
    Dim obj
    Dim rs

    'Create an instance of the class
    set obj = Server.CreateObject("DataAccess.clsDataAccess")

    'Set the connection string
    obj.ConnectionString = "Provider=SQLOLEDB.1;Data Source=;Initial
    Catalog=PUBS;User id=;Password=;"

    'Set execute and create our recordset
    set rs = obj.fnSQL_RS("SELECT * FROM AUTHORS")

    set obj = nothing

    'Display something
    While not rs.EOF
    Response.Write(Trim(rs("AU_LNAME")) + ", " + rs("AU_FNAME") + "<br>")
    rs.MoveNext
    Wend

    set rs = nothing
    %>
    Vincent Jones Guest

  2. Similar Questions and Discussions

    1. need help with connection string
      i keep reading that it is not secure to hard code the connection string to the server into my swf. so how can i get the string into my swf without...
    2. connection string
      Hi there, I have recently changed the connection string on a site that was working perfectly. I used an OLE DB connection with this code: var...
    3. Webservice Connection String
      Hi I have a dataset from a web service. I want to use a dataadapter with the dataset. What connection string should I use so the da knows that it...
    4. DB Connection String
      Hi, I need to store the database connection string inside web.config file. What would be the best way to encrypt and decrypt it? Thanks, Ali
    5. Is it necessary to have timeout value set for the connection string?
      Hello, I am new to ASP application. I have a asp-based web application that uses SQL Server as the backend. I open connections to the database...
  3. #2

    Default Re: 'Connection String not work'..

    We can't help you unless we know what DataAccess.cldDataAccess is. My first
    guess is that, surprise, it doesn't have a property called
    "ConnectionString."

    Why do you think you should use a DLL to make a connection to a database?
    It's actually much more efficient (and easier to debug) if you just make the
    connection from ASP.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "Vincent Jones" <vncntj@hotmail.com> wrote in message
    news:ba2a2d30.0401241332.7b87d30b@posting.google.c om...
    > I have this code looking at a registered dll, but i keep getting..
    > Object doesn't support this property or method: 'ConnectionString'
    > line 9
    >
    > <%
    > Dim obj
    > Dim rs
    >
    > 'Create an instance of the class
    > set obj = Server.CreateObject("DataAccess.clsDataAccess")
    >
    > 'Set the connection string
    > obj.ConnectionString = "Provider=SQLOLEDB.1;Data Source=;Initial
    > Catalog=PUBS;User id=;Password=;"
    >
    > 'Set execute and create our recordset
    > set rs = obj.fnSQL_RS("SELECT * FROM AUTHORS")
    >
    > set obj = nothing
    >
    > 'Display something
    > While not rs.EOF
    > Response.Write(Trim(rs("AU_LNAME")) + ", " + rs("AU_FNAME") + "<br>")
    > rs.MoveNext
    > Wend
    >
    > set rs = nothing
    > %>

    Aaron Bertrand [MVP] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139