×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

About ASP conneting Oracle

本文发表在 rolia.net 枫下论坛Hi,I have a problem,please solve it if you can,thank you.

In my win2000 server,I built a Orcle Database.Then,using Net8,I bulit a connection:bgora sucessfully. And,other workstations are bulit a connection seccessfully,too.

I have a ASP program:

<% session("q_ds")="bgora"
session("q_id")="office"
session("q_pw")="office"
set Cn = Server.CreateObject("ADODB.Connection")
Cn.Open session("q_ds"),session("q_id"),session("q_pw")
%>

when running,it had an error:

Microsoft OLE DB Provider for ODBC Drivers erroe '80004005'
[Microsoft][ODBC driver manager] no find data source name and no point default driver program.

/xxcx/local.asp,行5

abover is a translation

(Sorry, I can not do it better,so,flowing is the chinese sentence showing my screen :

Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC 驱动程序 管理器] 未发现数据源名称并且未指定默认驱动程序
/xxcx/local.asp,行5 )

I know we can use 1. cn.oprn "priveder=...msdaora;data source=...."

2. cn.open "driver={microsoft ODBC for oracle);server=..."

But,I long for that I can use "Cn.Open session("q_ds"),session("q_id"),session("q_pw")" .And,this sentence is being used in other machine now( Web in win2000,Oracle in UNIX).Why can not I do it? Maybe,do I need to install Oracel in other server?更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / About ASP conneting Oracle
    本文发表在 rolia.net 枫下论坛Hi,I have a problem,please solve it if you can,thank you.

    In my win2000 server,I built a Orcle Database.Then,using Net8,I bulit a connection:bgora sucessfully. And,other workstations are bulit a connection seccessfully,too.

    I have a ASP program:

    <% session("q_ds")="bgora"
    session("q_id")="office"
    session("q_pw")="office"
    set Cn = Server.CreateObject("ADODB.Connection")
    Cn.Open session("q_ds"),session("q_id"),session("q_pw")
    %>

    when running,it had an error:

    Microsoft OLE DB Provider for ODBC Drivers erroe '80004005'
    [Microsoft][ODBC driver manager] no find data source name and no point default driver program.

    /xxcx/local.asp,行5

    abover is a translation

    (Sorry, I can not do it better,so,flowing is the chinese sentence showing my screen :

    Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
    [Microsoft][ODBC 驱动程序 管理器] 未发现数据源名称并且未指定默认驱动程序
    /xxcx/local.asp,行5 )

    I know we can use 1. cn.oprn "priveder=...msdaora;data source=...."

    2. cn.open "driver={microsoft ODBC for oracle);server=..."

    But,I long for that I can use "Cn.Open session("q_ds"),session("q_id"),session("q_pw")" .And,this sentence is being used in other machine now( Web in win2000,Oracle in UNIX).Why can not I do it? Maybe,do I need to install Oracel in other server?更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • see inside
      把你的SESSION VARIABLES改成普通变量, 或者
      ------------------------------------------------------------------------------------
      if session("q_ds")="" then
      q_ds = bgora"
      session("q_ds") = "bgora"
      else
      q_ds = session("q_ds")
      endif
      ....
      set Cn = Server.CreateObject("ADODB.Connection")
      Cn.Open q_ds ,q_id,q_pw
      -----------------------------------------------------------------------------------