简体   繁体   English

如何使用ruby在Silverlight中连接到MySQL数据库?

[英]How to connect to MySQL database in silverlight using ruby?

when i use 当我使用

require 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 

or 要么

require 'rubygems'
require 'active_record'

in app.rb silverlight plugin crashing... 在app.rb silverlight插件中崩溃...

include System::Data

says

MemberAccessException: uninitialized constant System::Data

but System.Data.dll includes in xap file 但是System.Data.dll包含在xap文件中

anyone knows how i can connect to mysql database in silverlight using ruby? 有人知道我如何使用ruby在Silverlight中连接到mysql数据库吗?
PS i use ironruby Chiron server to generate *.xap PS我使用Ironruby Chiron服务器生成* .xap

You are trying to setup a direct connection to your MYSQL server using silverlight. 您正在尝试使用silverlight建立与MYSQL服务器的直接连接。 I think the trust levels in silverlight prohibit you to load the assemblies. 我认为Silverlight中的信任级别禁止您加载程序集。 What you should do is not using the database directly (why would you expose your database server directly?) and create a small webservice (eg MVC app) to handle json requests and interact that way with your data. 您不应该直接使用数据库(为什么要直接公开数据库服务器?),而不能创建一个小型Web服务(例如MVC应用程序)来处理json请求并与您的数据进行交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM