什么是“语言环境”在VS2010 [英] WHAT IS "locale" IN VS2010

查看:71
本文介绍了什么是“语言环境”在VS2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好
我找到了一个保存文件到DB的代码。但是VS2010无法识别区域设置



Hi I FIND A CODE FOR save file to DB. BUT the "locale" can't be recognize by VS2010

byte[] file;
            using (var stream = new FileStream(varFilePath, FileMode.Open, FileAccess.Read))
            {
                using (var reader = new BinaryReader(stream))
                {
                    file = reader.ReadBytes((int)stream.Length);
                }
            }
            using (var varConnection = Locale.sqlConnectOneTime(Locale.sqlDataConnectionDetails))
            using (var sqlWrite = new SqlCommand("INSERT INTO Raporty (RaportPlik) Values(@File)", varConnection))
            {
                sqlWrite.Parameters.Add("@File", SqlDbType.VarBinary, file.Length).Value = file;
                sqlWrite.ExecuteNonQuery();





谢谢



Thanks

推荐答案

Locale 是一个包含方法 sqlConnectOneTime 的Class。如果您希望通过查找源代码进行编程,则必须找到 Locale 的源代码。



如果找不到它,则必须编写自己的代码来实例化SQLConnection对象。尝试查看Visual Studio帮助文件的示例。



这是一个示例:SLCLConnection [ ^ ]
Locale is a Class that contains the method sqlConnectOneTime. If you expect to program by finding source code, you will have to find the source code for Locale.

If you can't find it, you will have to write your own code to instantiate the SQLConnection object. Try looking at the Visual Studio help files for examples.

Here is one example: SQLConnection[^]


这篇关于什么是“语言环境”在VS2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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