asp with sql server

Results 1 to 3 of 3

Thread: asp with sql server

  1. #1
    Join Date
    Dec 1969

    Default asp with sql server

    i tried to connect sql server with asp in remote host<BR>my code is here<BR><BR>i gave the ip address also<BR><BR><BR>set cn=server.createobject("adodb.connection")<BR>cn.o pen "provider=sqloledb;" &_<BR>"network library=dbmssocn;"&_<BR>"data source=ipaddress,1433;" &_<BR>"initial catalog=first"&_<BR>"user id=;"&_<BR>"password=;"&_<BR>"database=first"<BR>s et rs=server.createobject("adodb.recordset")<BR>rs.op en "select * from sample",cn<BR><BR>but i&#039;m getting the error as<BR><BR> i don&#039;t know what&#039;s wrong in the code<BR>Microsoft OLE DB Provider for SQL Server (0x80040E4D)<BR>Login failed for user &#039;IUSR_SYS5&#039;.<BR><BR>can any one help me<BR><BR>thanks <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: asp with sql server

    it&#039;ll probably be because you&#039;re not supplying a username/password combo, and so the webservers identity (IUSR_SYS5) is being used to login to the db, in which case the solution would be to either supply a username & pwd or to allow the user IUSR_SYS5 access to the db.<BR><BR>c

  3. #3
    Join Date
    Dec 1969

    Default something else...

    thats going to be an issue, is the line<BR><BR>"initial catalog=first"&_<BR><BR>there is no semi colon at the end so no separation with your user id, the connection string will be <BR>...initial catalog=firstuser id=;...<BR><BR>Change that line to <BR>"initial catalog=first;"&_

Posting Permissions

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