首页 \ 问答 \ 找不到tomcat装在哪里了?

找不到tomcat装在哪里了?

怎么查找tomcat路径啊!!
更新时间:2022-11-07 09:11

最满意答案

database=smphs
这不是已经指定了数据库的路径了么?
可以不需要的~
应该要写一样的吧

如何建立MYSQL数据库的连接?
在安装好MYSQL ODBD的驱动程序后,应如何建立ASP文件连接数据库? 

我们有两种方法:

一种是在ODBC数据源中建立一个DSN。具体方法是:
1、打开控制面板中的ODBD数据源;
2、选择系统DSN,添加一个新的DSN驱动程序;
3、选择MyODBD,出现一个对话框供输入MySQL:
(1)Windows DSN name:所要建立DSN的名称;
(2)MySQL Host (name or ip):MySQL服务器的名称或IP地址。一般填LocalHost ;
(3) MySQL database name:需要使用数据库的名称。
4、在MySQL管理程序中建立数据库。以数据库chunfeng为例,内有user数据表,两个字段分别是:username和password,我们可以试着加入几个记录:
(1)user:连接数据库的用户名。可填root超级用户;
(2)password:连接数据库用户口令。可不填;
(3)Port(if not 3306):MySQL在服务器的端口。填默认为3306;
(4)SQL command on connect:使用SQL命令连接数据库。可不填。
全部填完后按OK保存。

好了,我们来连接数据库,ASP代码如下: 
<% 
strConnection = "dsn=chunfeng;driver={myodbd driver};server=localhost;uid=root;pwd=; database=chunfeng" 
Set adoDataConn = Server.CreateObject("ADODB.Connection") 
adoDataConn.Open strConnection

strQuery = "SELECT * FROM user" 
Set rs = adoDataConn.Execute(strQuery) 
If Not rs.BOF Then 
%> 


 用户名

 
<% 
Do While Not rs.EOF 
%> 
 
<% 
rs.MoveNext 
Loop 
%> 

口令
<%=rs("username")%> <%=rs("password")%>
<% Else Response.Write("Sorry, no data found.") End If rs.Close adoDataConn.Close Set adoDataConn = Nothing Set rsEmailData = Nothing %> 另一种方法就是把上面ASP代码第二行代码改为: strconnection="DefaultDir=;Driver={myodbc driver};database=chunfeng" 并且无需建立系统DSN,也不需要用户名和口令。不过不推荐使用这种方法。

其他回答

"driver={mysql};database=data;uid=userid;pwd=password;option=apc6;"
  链接数据库的asp代码!
  <%
  
strconnection  =  "dsn=hc188;driver={myodbd  driver};server=localhost;uid=root;pwd=;database=hc188"
  
set  adodataconn  =  server.createobject("adodb.connection")
  
adodataconn.open  strconnection
   strquery  =  "select  *  from  user"
  
set  rs  =  adodataconn.execute(strquery)
  
if  not  rs.bof  then
  
%>
  
<table>
  
<tr>
   <td<b>username</b></td>
   <td><b>password</b></td>
   </tr>
  
<%
  
do  while  not  rs.eof
  
%>
  
<tr>
   <td><%=rs("username")%></td>
   <td><%=rs("password")%></td>
   </tr>
  
<%
  
rs.movenext
  
loop
  
%>
  
</table>
  
<%
  
else
  
response.write("sorry,  no  data  found.")
  
end  if
  
rs.close
  
adodataconn.close
  
set  adodataconn  =  nothing
  
set  rsemaildata  =  nothing
  
%>

相关问答

更多
  • Public con As ADODB.Connection, Str As String, Adodc As ADODB.Recordset, sql As String Public Sub Ado_Open() con = New ADODB.Connection Str = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & System.IO.Directory.GetCurrentDirectory & "\Finance.mdb;pwd=;Rea ...
  • 首先新建一个Dafault.aspx文件里加入一个GrilView 然后Dafault.aspx.cs文件开头处加入这句 using System.Data.SqlClient; 再来就是protected void Page_Load(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Initial Catalog=数据库名称;Data Source=主机User ID=数据库帐号;password=密码"); Sq ...
  • 打开控制面板,管理工具里的obdc,点添加SQL server选择数据库
  • 如果是要在虚拟主机上连接的话,首先你要确定你的虚拟主机装了MYSQL ODBC 驱动.否则,你再怎么问都没有用.. 如果装了可以用下面的方式连接 set conn=server.createobject("adodb.connection") connstr="driver={mysql odbc 3.51 driver};database=aaa;uid=bbb;password=cccf;stmt=set names 'gbk'" conn.open connstr 上面我写的是3.51驱动的连接,如果 ...
  • 用什么数据库,开发语言等,还是要看你的服务器配置的,windows类型的系统asp/.net+sqlserver unix系统用php+mysql 这是最佳的组合,sqlserver有存储过程,事务处理在windows上得到优化,速度是不错的,如果你的系统是在windows上的,不建议用php+mysql,如果用了,性能绝对赶不上sqlserver的
  • asp+MYSQL代码如下,把加粗部份改成你的数据库信息: set conn = server.createobject("adodb.connection") conn.open "driver={mysql odbc 3.51 driver};database=你的数据库名;server=数据库IP地址;uid=用户名;password=密码" MYSQL软件下载及使用说明请参考 http://www.shuxiang.org/MySQL-Front.asp
  • Set Conn=Server.CreateObject("ADODB.Connection") servername="XINZHI-SERVER" dbname="User_info" StrConn="Driver={ mysql odbc 3.51 driver};Server=(localhost);DataBase=hr;Uid=root;Pwd=root" Conn.open strConn if err then err.Clear Set Conn = Nothing Response.W ...
  • "Driver={mysql};database=data;uid=userid;pwd=password;option=apc6;" 链接数据库的asp代码! <% strconnection = "dsn=hc188;driver={myodbd driver};server=localhost;uid=root;pwd=;database=hc188" set adodataconn = server.createobject("adodb.connection") adodataconn.open ...
  • database=smphs 这不是已经指定了数据库的路径了么? 可以不需要的~ 应该要写一样的吧 如何建立MYSQL数据库的连接? 在安装好MYSQL ODBD的驱动程序后,应如何建立ASP文件连接数据库? 我们有两种方法: 一种是在ODBC数据源中建立一个DSN。具体方法是: 1、打开控制面板中的ODBD数据源; 2、选择系统DSN,添加一个新的DSN驱动程序; 3、选择MyODBD,出现一个对话框供输入MySQL: (1)Windows DSN name:所要建立DSN的名称; (2)MySQL Ho ...
  • 一般情况下采用的都是MyODBC,你可以咨询一下提供商MyODBC的版本,然后应用下面的代码,注意驱动版本号。 ------------------------------------------------------------------------- Dim conn set conn = Server.CreateObject("ADODB.Command") conn.open "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=c ...

相关文章

更多

最新问答

更多
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
  • 是否可以嵌套hazelcast IMaps?(Is it possible to nest hazelcast IMaps? And whick side effects can I expect? Is it a good Idea anyway?)
  • UIViewAnimationOptionRepeat在两个动画之间暂停(UIViewAnimationOptionRepeat pausing in between two animations)
  • 在x-kendo-template中使用Razor查询(Using Razor query within x-kendo-template)
  • 在BeautifulSoup中替换文本而不转义(Replace text without escaping in BeautifulSoup)
  • 如何在存根或模拟不存在的方法时配置Rspec以引发错误?(How can I configure Rspec to raise error when stubbing or mocking non-existing methods?)
  • asp用javascript(asp with javascript)
  • “%()s”在sql查询中的含义是什么?(What does “%()s” means in sql query?)
  • 如何为其编辑的内容提供自定义UITableViewCell上下文?(How to give a custom UITableViewCell context of what it is editing?)
  • c ++十进制到二进制,然后使用操作,然后回到十进制(c++ Decimal to binary, then use operation, then back to decimal)
  • 以编程方式创建视频?(Create videos programmatically?)
  • 无法在BeautifulSoup中正确解析数据(Unable to parse data correctly in BeautifulSoup)
  • webform和mvc的区别 知乎
  • 如何使用wadl2java生成REST服务模板,其中POST / PUT方法具有参数?(How do you generate REST service template with wadl2java where POST/PUT methods have parameters?)
  • 我无法理解我的travis构建有什么问题(I am having trouble understanding what is wrong with my travis build)
  • iOS9 Scope Bar出现在Search Bar后面或旁边(iOS9 Scope Bar appears either behind or beside Search Bar)
  • 为什么开机慢上面还显示;Inetrnet,Explorer
  • 有关调用远程WCF服务的超时问题(Timeout Question about Invoking a Remote WCF Service)