Sql to XML实时翻译 [英] Sql to XML realtime translator

查看:87
本文介绍了Sql to XML实时翻译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在C#中获得了很多网站分配,使用了各种风格的MS Sql数据库类型的连接(Sql Server) ,快递,CE等)。对于我的基础级学生来说,设置Sql server(任何版本)都是繁琐的工作并且经常会出现问题。



我想我必须有另一种选择。对于测试和低流量网站,我正在考虑将表格及其数据保存为XML文件(或类似文件),这些文件可以与项目一起保存。但是,这些文件不应该通过XMLDataSource连接,而是通过等效的常规SqlDataSource连接,只有这个新的数据源才能转换为XML文档。



换句话说,我正在寻找的是一种像往常一样创建,更新,删除和读取表和SQL查询的方法,只是将所有内容存储为文本文件(可能是XML格式)。这对于教学和分配任务(或者我希望如此)非常有帮助。无论这个想法是否听起来很愚蠢,我想知道是否有人知道这种功能是否已经存在应用程序或Visual Studio附加组件,如果没有,如果这个实时翻译器完全可以编码和包含在Visual Studio中。



爱所有人,



Pettrer

Hi all,

I get a lot of web site assignments in C# to go through, using connections to various flavours of the MS Sql database types (Sql Server, Express, CE, etc). For my basic-level students, setting up Sql server (any edition) is tedious work and often problematic.

I''m thinking that there must be an alternative. For testing, and for low-traffic web sites, I''m thinking of saving tables and their data as XML files (or the like), which could be saved with the project. However, these files should not be connected to via an XMLDataSource, but via an equivalent to the regular SqlDataSource, only that this new datasource translates to and fro an XML document.

In other words, what I am looking for is a way to create, update, delete, and read from tables and sql queries as usual, only that everything is stored as text files (possibly in XML format). This would really help when teaching and also grading assignments (or so I hope). Regardless whether this idea sounds stupid or not, I wonder if anyone knows if there already exists applications or Visual Studio add-ons for this kind of feature, and if not, if this "realtime translator" would at all be possible to code and include in Visual Studio.

Love to all,

Pettrer

推荐答案

设置Sql Server CE可以像提供DLL一样简单,所以我先推荐一下。



可能可以在SqlDataSource中包装XMLDataSource吗? (我从来没用过。)



我不会尝试实现完整的SQL引擎,但我想在周末可以实现一小部分 - - 使用VS或其他方式。它可能具有教育意义。



我怀疑你必须掌握XPath才能实现WHERE子句。
"Setting up" Sql Server CE can be as simple as providing the DLLs, so I''d recommend that first.

Might it be possible to wrap an XMLDataSource in an SqlDataSource? (I''ve never used one.)

I would not try to implement a full SQL engine, but I suppose a small subset could be implemented in a weekend -- with VS or otherwise. It could be educational.

I suspect you''d have to master XPath in order to implement WHERE clauses.


这篇关于Sql to XML实时翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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