我在哪里可以学习对 sqldatasource 进行编程

发布于 2024-09-11 11:33:59 字数 350 浏览 2 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一杯敬自由 2024-09-18 11:33:59

链接服务器和同义词是 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.

神也荒唐 2024-09-18 11:33:59

只需像访问普通表并对其执行操作一样设置 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文