使用JavaScript 访问本地ODBC数据库
2008-07-08 11:56
471 查看
问:
Hi,
I need to access a sql database through odbc using javascript. This database resides in the client PC
and the only way to connect to it is using the client PC ODBC. The asp.net application need to retreive
and update data to that database. I don't know how to do this so I need some help of you guys. My
experience is in c# and vb.net, not in javascript but I know that if I need to access the client PC resources
it has to be javascript or vbscript. If there's any other way to do this please let me know.
答:
Hi javidot
Just as HeartattacK said, it is no recommend because of security issue.
You can try the following code, hope this helps:
code from http://topic.csdn.net/t/20031028/12/2402598.html
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<P><div id=test> </div>
<P><INPUT id="button1" type="button" value="Run" name="button1" onclick="connectDb();"></P>
</BODY>
</HTML>
May be you will interesting in this:
ODBC Support for Javascript
http://www.freeswitch.org/node/44
If I’ve misunderstood your problem, please feel free to let me know.
Thanks.
Hi,
I need to access a sql database through odbc using javascript. This database resides in the client PC
and the only way to connect to it is using the client PC ODBC. The asp.net application need to retreive
and update data to that database. I don't know how to do this so I need some help of you guys. My
experience is in c# and vb.net, not in javascript but I know that if I need to access the client PC resources
it has to be javascript or vbscript. If there's any other way to do this please let me know.
答:
Hi javidot
Just as HeartattacK said, it is no recommend because of security issue.
You can try the following code, hope this helps:
code from http://topic.csdn.net/t/20031028/12/2402598.html
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<P><div id=test> </div>
<P><INPUT id="button1" type="button" value="Run" name="button1" onclick="connectDb();"></P>
</BODY>
</HTML>
May be you will interesting in this:
ODBC Support for Javascript
http://www.freeswitch.org/node/44
If I’ve misunderstood your problem, please feel free to let me know.
Thanks.
相关文章推荐
- VC++使用ADO方法读写Microsoft Access本地数据库文件(不用ODBC)
- 帮助你使用数据库方式访问JSON数据的javascript类库-TaffyDB
- 使用ODBC访问数据库
- 使用javascript来访问本地文件夹
- 使用ODBC访问数据库
- 使用ODBC和ADO访问数据库
- 帮助你使用数据库方式访问JSON数据的javascript类库-TaffyDB
- 使用OracleClient,OLEDB,ODBC,Visual Studio,ODP.NET 来连接 Oracle访问数据库
- javascript访问本地数据库
- 使用javascript来访问本地文件夹
- 如果在本地搭一个服务器和mysql数据库环境,如果使用java来访问数据库
- ASP.NET访问数据库(一):使用odbc填充datagrid
- 使用ODBC访问数据库(一)
- 使用PH实现本地访问Predix数据库
- 帮助你使用数据库方式访问JSON数据的javascript类库-TaffyDB
- 使用odbc访问数据库
- 使用ODBC访问数据库(二)
- 使用ODBC访问数据库
- 使用ODBC访问数据库
- 使用ODBC数据提供程序访问MSSQL数据库