Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何阻止XSD designer在XSD codebehind中为表添加数据库名称前缀_C#_Asp.net_Vb.net_Xsd - Fatal编程技术网

C# 如何阻止XSD designer在XSD codebehind中为表添加数据库名称前缀

C# 如何阻止XSD designer在XSD codebehind中为表添加数据库名称前缀,c#,asp.net,vb.net,xsd,C#,Asp.net,Vb.net,Xsd,在ASP.NEt应用程序中,我们有一个XSD文件和一个web.config文件 在配置文件中,我们指定了如下连接字符串: <add name="DbConnectionString" connectionString="Data Source=sqldb;Initial Catalog=TestDB;Persist Security Info=True;User ID=user;Password=password;" providerName="System.Data.SqlClient"

在ASP.NEt应用程序中,我们有一个XSD文件和一个web.config文件

在配置文件中,我们指定了如下连接字符串:

<add name="DbConnectionString" connectionString="Data Source=sqldb;Initial Catalog=TestDB;Persist Security Info=True;User ID=user;Password=password;" providerName="System.Data.SqlClient"/>

在XSD codebehind中,每个表适配器select命令都有以下行(自动生成):

<DbSource ConnectionRef="DbConnectionString (Web.config)" DbObjectName="dbo.CUSTOMER" ...

将不同数据库中的表添加到数据集中时会发生这种情况。向数据集添加表或查询时,不要获取不同的数据库或连接字符串。请检查添加到数据集的所有表。然后将具有相同问题的表重新创建到当前数据集。添加数据集表时不要更改连接名称。使用web配置中指定的相同连接字符串


谢谢

你能分享你在webonfg中指定的连接字符串吗?我已经用它更新了问题。
<DbSource ConnectionRef="DbConnectionString (Web.config)" DbObjectName="TestDb.dbo.CUSTOMER" ...