网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > SQL技巧
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
本月文章推荐
.如何得到两个相邻snap_id中的一个.
.SQL Server 2005中三种插入XML数.
.如何清除SQL日志.
.SQL Server 2005数据加密技术的实.
.怎样在SQL Server 2005中用证书加.
.SQL Server 2000 在 win2003上安.
.Microsoft数据平台开发与SQL Ser.
.数据库升迁从sqlserver6.5到sqls.
.讲解V$Datafile_Header相关字段的.
.SQL Server 中易混淆的数据类型.
.改变默认设置并且给每个文件指定.
.SQL Server 2008新功能─传递表值.
.sql server日期时间函数.
.讲解一个检索最近日期的采购价的.
.SQL 视图效率和连接超时设置.
.sql中的iif语句详解.
.讲解如何检查使用空间大于90%的表.
.SQL SERVER数据库开发之存储过程.
.大型MIS软件的开发必须重视数据库.
.一個Select出一個表中第N條記錄的.

win98+PWS环境下连接读取远程SQLServer

发表日期:2001-4-3


from: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=4&txtCodeId=6518
Connect/Read Remote SQL server Using PWS in win 98


     I had to test Microsoft's Personal Webserver (PWS) in win 98 to access Remote SQL server 7.0
installed in a NT server. The clients to win 98 had LAN connections. Easy one , don't vote, have fun with
PWS. In fact I tested my connection with this script, before I created an out of process server demo with
VB.



  
  

code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!


Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in
compiled format for langauges that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the
original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the code or
code's description.  


    '**************************************
    ' Name: Connect/Read Remote SQL server U
    '     sing PWS in win 98
    ' Description:I had to test Microsoft's
    '     Personal Webserver (PWS) in win 98 to ac
    '     cess Remote SQL server 7.0 installed in
    '     a NT server. The clients to win 98 had L
    '     AN connections. Easy one , don't vote, h
    '     ave fun with PWS. In fact I tested my co
    '     nnection with this script, before I crea
    '     ted an out of process server demo with V
    '     B.
    ' By: Manas Mukherjee
    '
    ' Assumes:Knowing Little bit of LAN woul
    '     d help , VPN, HTML, Creating Virtual dir
    '     ectory with PWS
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/xq/ASP/txtCode
    '     Id.6518/lngWId.4/qx/vb/scripts/ShowCode.
    '     htm    'for details.    '**************************************
    
    <HTML><HEAD>
    <TITLE> ASP_PUBS/SQL Server In NT server</TITLE>
    </HEAD>
    <BODY><CENTER>
    <%
    Dim objConn, objRS, strQ, strOut, I
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=pubs;Data Source=\\URServerName"
    Set objRS = Server.CreateObject("ADODB.Recordset")
    strQ = "SELECT emp_id, fname, lname,job_id "
    strQ = strQ & "FROM Employee "
    objRS.Open strQ, objConn, , , adCmdText
    %>
    <TABLE BORDER=1 CELLPADDING=4>
    Connected To the Database Pubs
    using connect String "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=pubs;Data Source=\\URServername"
    <TH> "EmployeeID" </TH>
    <TH> "FirstName" </TH>
    <TH> "LastName" </TH>
    <TH> "job_id" </TH>
    <% Do While Not objRS.EOF %> <TR>
    <TD> <% = objRS("emp_id") %>
    <TD> <% = objRS("fname") %>
    <TD> <% = objRS("lname") %></TR>
    <TD> <% = objRS("job_id") %></TR>
    <% objRS.MoveNext %>
    <% Loop %>
    <% objRS.Close %>
    <% Set objRS = Nothing %>
    <% Set objConn = Nothing %>
    </TABLE>
    </CENTER>
    </BODY>
    </HTML>


上一篇:如何将图片存到数据库中? 人气:13439
下一篇:影响SQL server性能的关键三个方面  人气:11373
浏览全部的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐