嗨小伙伴们 i在c#中创建了一个应用程序并使用了实体和sql server 2008数据库,它包含大约15个数据集,在编译和创建设置后,我将它安装在另一台计算机上进行测试,我已经配置了数据库和app.config文件,它成功连接到数据库但是当它试图将数据从数据集加载到组合框时[我有binde组合框与数据集] 它显示我错误,无法登录,有时它告诉我没有那个数据集的实例!!!!!!!!!!!!!!!!!! 我应该在安装包中包含数据集吗?
hi guys i have created an app in c# and using entities and sql server 2008 database and it contains about 15 datasets, after compiling and creating setup, i installed it in another computer to test it, i have configured database and app.config file , its successfully connect to database BUT when its trying to load data from datasets to combobox [i have binde combobox with dataset] it show me error, couldnt login, and some times its show me that there is no instance of that dataset!!!!!!!!!!!!!!!!!! should i have to include datasets in setup pack?
推荐答案最后我发现什么是错的,用向导创建的数据集,所以连接字符串是app.config中的连接字符串,所以我在表单上设置了它们加载,这解决了问题。 finally i found whats wrong, the datasets created with wizard , so the connection strings are diffrenet from the one in app.config, so i have set them on form loading and this solve the issue.
更多推荐
数据集,编译,发布
发布评论