我在哪里可以学习对 sqldatasource 进行编程
我在 vs08 网页的 sql server 08 中使用链接服务器和同义词,
当我将 sqldatasource 连接到数据库时,它不显示链接服务器或同义词! (我不知道为什么它不显示链接的服务器)。
所以我手动为 sql 数据源编写查询,就像
select * from synonymname;
我想在 sqldatasource 绑定到视图等控件时使用 sqldatasource 提供的设施一样。
我从哪里可以学习如何对 sqldatasource 进行编程并编写插入删除更新查询,这样当它适用于任何网格,可以完美地提供所有功能,例如分页、删除、插入、更新等。
i am using linked severs and synonym in sql server 08
in vs08 webpage when i connect the sqldatasource to the db it doesnot show the linked server or the synonyms!! (i don't know why it doesnot show the linked severs).
so i write queries manually for the sql datasource like
select * from synonymname;
i would like to use the facilities given by sqldatasource when it binds to controls like like view etc.
from where can i learn how to program the sqldatasource and write queries for insert delete update such that when biding to any grid, it works perfectly offering all the features like paging deleting insert updating etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
链接服务器和同义词是 SQL Server 非常特殊的功能。大多数设计师不理解它们。我会在服务器端抽象链接服务器。编写一些将查询封装到链接服务器的视图,并在应用程序中使用这些视图。
我没有关于 SqlDataSource 的资源。
Linked Servers and synonyms are very special features of SQL Server. Most designers don't understand them. I would abstract the linked server on server side. Write some VIEWs that encapsulate the queries to the linked server and use those views in your application.
I don't have a resource about the SqlDataSource.
只需像访问普通表并对其执行操作一样设置 sql 数据源,然后绑定到网格视图
现在
单击设计视图中的 sql 数据源并查看其属性,其中有选择查询、删除查询等,看看它们如何编写然后使用 sqldatasource 但编写类似的查询来访问您的链接服务器...然后绑定到网格视图,
它将像使用本地数据库一样工作
just setup the sql data source as one would for accessing and performing operations on a normal table, and bind to grid view
now
click on the sql data source in design view and view its properties there is the select query, delete query etc see how they are written and then use a sqldatasource but there write similar queries to access ur linkserver... and then bind to grid view,
it will work as if its working with local database