Chinaunix首页 | 论坛 | 博客
  • 博客访问: 815944
  • 博文数量: 328
  • 博客积分: 7000
  • 博客等级: 少将
  • 技术积分: 3810
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-15 22:00
文章分类

全部博文(328)

文章存档

2009年(2)

2008年(84)

2007年(207)

2006年(35)

我的朋友

分类:

2008-03-27 17:16:26

Here are the steps I took in getting mine to work ...

I'll try to explain the steps I took in getting the Sybase Server to talk to IIS (which they both run on NT)

Step 1: Write ASP Code

<%
Dim strSQL
Dim Conn
Dim rsSQL


'Write Query
strSQL = "Select * From xx"


'Connect to Sybase via ADODB
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Sybase System 11}; Srvr=xxx; Db=xx; Uid=xx; Pwd=xx;"


'Execute Query
Set rsSQL = Server.CreateObject("ADODB.recordset")
rsSql.Open strSQL, Conn, 3
%>

Step 2: Verify Server Settings

In order for ASP to query Sybase, the IIS box must first have the ability to query Sybase. either through SQL Advantage or isql from DOS

Make sure the sql.ini file (located in \Sybase\ini directory) uses TCP protocols settings. If the sql.ini file uses "NLMSNMP,\\boston_pcc\pipe\sybase\query" then it wouldn't work


Here's a copy of the sql.ini file from the IIS box

sql.ini
---------------------------------

[xxx_1]
master=TCP,161.125.206.8,5000
query=TCP,161.125.206.8,5000


[xxx_2]
master=TCP,161.125.206.26,5000
query=TCP,161.125.206.26,5000


[xxx_3]
master=TCP,161.125.206.10,5000
query=TCP,161.125.206.10,5000

Step 3: Updates

Update the IIS Server to Microsoft Data Access Component version 2.5 (MDAC 2.5) from:


Step 4: Change IUSR Account

What this does, is to not prompt for a password when Sybase is sitting on another platform (I think)

If you open IIS Management Console on the web server locate the virtual
directory that you created,

right click
choose properties,
choose the Directory Security tab,
click Edit Anonymous
ake sure Allow Anonymous is checked
click Edit,
make sure the Enable Automatic Password Sync is NOT checked,
click OK,
click OK,
click OK,
close IIS manager and try again.
The Enable Automatic Password Sync does not work when a database is on another platform like UNIX.
阅读(1303) | 评论(0) | 转发(0) |
0

上一篇:asp连接sybase

下一篇:成就事业,知道些好

给主人留下些什么吧!~~