本文介绍了Backgroundworker和OleDbConnection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是VB.Net的新手。我有一个背景工作程序例程,它与UI共享OleDBConnection。请注意,当backgroundworker使用OleDBConnection时,UI例程不会使用它。奇怪的是,当我在设计环境(visual basic express 2010)中运行程序时,它运行正常。但是当我在其他计算机上运行可执行文件时,它会在OleDb.OleDbDataReader行停止。我在整个程序中使用了connection.open和.close语句 - 它再次在设计环境中工作。有没有人见过这个?我需要做什么?

I am new to VB.Net. I have a backgroundworker routine that shares OleDBConnection with UI. Note when backgroundworker uses OleDBConnection, it''s not used by UI routines. The strange thing is when I run the program in design environment (visual basic express 2010), it works fine. But when I run the executable in other computers, it stops at OleDb.OleDbDataReader line. I use connection.open and .close statement throughout the program - again it works in the design environment. Has anyone seen this? What do I need to do?

推荐答案


这篇关于Backgroundworker和OleDbConnection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 22:19