写访问数据库 [英] writting to access database

查看:68
本文介绍了写访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决这个问题,我已经开发了一个asp.net网站,但是当我使用web.config文件将其托管在生产服务器上时,当我删除web.config时,该网站会抛出异常文件运行,但由于连接字符串存储在web.config文件中,所以我无法访问我的SQL Server数据库,请问该如何解决此问题?

这是我运行应用程序时收到的消息:



如果可以,我可以使用存储在App_Data文件夹中的访问数据库吗?如果可以,如何创建连接字符串并使用表格将数据写入数据库?

在此先感谢

马丁

该网站可以编译,但是在加载时会引发异常:这是异常的详细信息:

hi there, please help me with this problem, i have developed an asp.net website but when i host it on a production server with the web.config file, the website throws and exception, when i remove the web.config file it runs but i cannot access my SQL server database because the connection string is stored in the web.config file, please how can i go about this problem?

This is the message i get when i run the application:



If possible can i use an access database stored in my App_Data folder, if yes, how can i created the connection strings and use the form to write data into the database?

Thanks in advance

Martin

The website compiles but it throws an exception on loading: This is the exception details:

A name was started with an invalid character. Error processing resource ''http://www.ampcmarketing.com/Default.aspx''. Line 1, Position 2 

<![CDATA[<%@ Page Language="C#" MasterPageFile="~/MainNavigation.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherit...

%>]]>

%>]]>

推荐答案

好像您的网页中的字符无效.您是否考虑过阅读错误消息?
Looks like you have an invalid character in your webpage. Did you consider reading the error message ?


这篇关于写访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆