VB从机器到机器的差异 [英] VB variance from machine to machine

查看:88
本文介绍了VB从机器到机器的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows XP机器上写了一个VB程序。它可以进行多表查询,

你可以添加/删除和编辑记录,这一切都非常精彩。我非常小心地验证数据,并且在我的机器上它运行得非常好。


我编译它,并发送了可执行文件,它工作正常我的机器,到其他地方的
生意。


他们也有一台Windows XP机器。当他们运行我的可执行文件时,使用我使用的

相同的数据库,程序打开并将所有文本框(链接到表字段的
)设置为空格。当他对任何

记录进行更改时,该更改将复制到每条记录。

从机器移动代码时有没有人看到任何奇怪的事情

to machine?

Adrian

解决方案



" Adrian Parker" <广告*********** @ NOSPAMsympatico.ca>在留言中写道

新闻:L _ ****************** @ news20.bellglobal.com ...

他们也有一台Windows XP机器。当他们运行我的可执行文件时,使用
我使用的同一个数据库,程序打开并将所有文本框(链接到表字段)设置为空格。




您的文本字段很可能设置为数据源。数据源

指向数据库和数据。因此,数据库可能指向您的客户PC上不存在的本地驱动器和目录(除非您再次确认环境中的
)。


这当然可以以编程方式完成,例如:


Data1.DatabaseName =" c:\whereever \whatdb.md"

Data1.RecordSource =" Select * from ..whatever"

Data1.Refresh




" Adrian Parker" <广告*********** @ NOSPAMsympatico.ca> skrev i en meddelelse

新闻:L _ ****************** @ news20.bellglobal.com ...

我在Windows XP机器上写了一个VB程序。它做多表
查询,你可以添加/删除和编辑记录,这一切都非常精彩。我
非常小心验证数据,在我的机器上运行得非常好。

我编译了它,并将可执行文件发送到
a其他地方的业务。

他们也有一台Windows XP机器。当他们运行我的可执行文件时,使用
我使用的同一个数据库,程序打开并将所有文本框(链接到表字段)设置为空格。当他对任何
记录进行更改时,该更改将复制到每条记录中。


也许是一个愚蠢的问题,但你确定你已经把mdb

文件的路径改为app.path而不是它在你机器上的静态路径??


在init的所有文本框中看起来像是空格,是一个数据库

not发现!!


将代码从机器移动到机器时有没有看到任何奇怪的事情发生?

Adrian





" Steen Gellett" <他******* @ NoSpam.Net>在消息中写道

news:40 *********************** @ dread16.news.tele.d k ... < blockquote class =post_quotes>
Adrian Parker <广告*********** @ NOSPAMsympatico.ca> skrev i en meddelelse
新闻:L _ ****************** @ news20.bellglobal.com ...

我写了一个VB我的Windows XP机器上的程序。它可以进行多表查询,

可以添加/删除和编辑记录,这一切都非常精彩。我


非常小心验证数据,在我的机器上它运行得很好。

我编译了它,并发送了可执行文件,在我的机器上工作正常,



到其他地方的

业务。

他们也有Windows XP机。当他们运行我的可执行文件时,使用


我使用的相同数据库,程序打开并将所有文本框(链接到表字段)设置为空白空间。当他对任何
记录进行更改时,该更改将被复制到每条记录中。



也许是一个愚蠢的问题,但是你确定你已经走上了mdb
文件到app.path而不是你机器上的静态路径??




是的。他的机器打开数据库,因为他的一个
非绑定控件(一个组合框)中的数据正在从查询中正确接收数据,

并且正在填充正确。

Adrian


I wrote a VB program on my Windows XP machine. It does multi table queries,
you can add/delete and edit records, it all worked very beautifully. I was
very careful to validate data, and on my machine it works very well.

I compiled it, and sent the executable, which works fine on my machine, to a
business elsewhere.

They also have a Windows XP machine. When they run my executable, using the
same database I use, the program opens and sets all textboxes (which are
linked to table fields) to blank spaces. When he makes a change to any
record, that change is copied to every record.
Has anyone seen any strange things happening when moving code from machine
to machine?
Adrian

解决方案


"Adrian Parker" <ad***********@NOSPAMsympatico.ca> wrote in message
news:L_******************@news20.bellglobal.com...

They also have a Windows XP machine. When they run my executable, using the same database I use, the program opens and sets all textboxes (which are
linked to table fields) to blank spaces.



Your text fields are most likely set to a "data source". The data source
points to the database and data. So the database might be pointing to your
local drive and directory which won''t exist on your customer PC (unless you
reproduce the exact environment).

This of course can be done programatically, for example:

Data1.DatabaseName = "c:\whereever\whatdb.md"
Data1.RecordSource = "Select * from ..whatever"
Data1.Refresh



"Adrian Parker" <ad***********@NOSPAMsympatico.ca> skrev i en meddelelse
news:L_******************@news20.bellglobal.com...

I wrote a VB program on my Windows XP machine. It does multi table queries, you can add/delete and edit records, it all worked very beautifully. I was very careful to validate data, and on my machine it works very well.

I compiled it, and sent the executable, which works fine on my machine, to a business elsewhere.

They also have a Windows XP machine. When they run my executable, using the same database I use, the program opens and sets all textboxes (which are
linked to table fields) to blank spaces. When he makes a change to any
record, that change is copied to every record.
Maybe a stupid question , but are you sure you''ve made the path to mdb
files to "app.path" and not a static path that it was on your machine ??

It seems like blank spaces in all your text boxes on init, is a database
not found !!



Has anyone seen any strange things happening when moving code from machine
to machine?
Adrian




"Steen Gellett" <He*******@NoSpam.Net> wrote in message
news:40***********************@dread16.news.tele.d k...


"Adrian Parker" <ad***********@NOSPAMsympatico.ca> skrev i en meddelelse
news:L_******************@news20.bellglobal.com...

I wrote a VB program on my Windows XP machine. It does multi table queries,

you can add/delete and edit records, it all worked very beautifully. I


was

very careful to validate data, and on my machine it works very well.

I compiled it, and sent the executable, which works fine on my machine,


to a

business elsewhere.

They also have a Windows XP machine. When they run my executable, using


the

same database I use, the program opens and sets all textboxes (which are
linked to table fields) to blank spaces. When he makes a change to any
record, that change is copied to every record.



Maybe a stupid question , but are you sure you''ve made the path to mdb
files to "app.path" and not a static path that it was on your machine ??



Yes. His machine opens the database, because the data in one of his
non-bound controls (a combo box) is properly receiving data from a query,
and is being populated properly.
Adrian


这篇关于VB从机器到机器的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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