惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
腾讯CDC
博客园 - 司徒正美
A
About on SuperTechFans
H
Help Net Security
J
Java Code Geeks
C
Check Point Blog
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
MyScale Blog
MyScale Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
博客园 - 【当耐特】
雷峰网
雷峰网

博客园 - 空中的风月

EJB 简介 MyBatis 简介 Hibernate 简介 Struts2 简介 Spring MVC简介 WebLogic中的一些基本概念 浅谈WebLogic和Tomcat Tomcat安装配置 由少林寺比武想到软件行业分工 觀察者模式 SQLServer硬件性能监控列表 数据库方面面试问题 JAVA程序员面试32问 C#常看面试问题以及解答 在做物流的库存管理系统里,需要注意。。。。。 项目管理中可能有的问题,以及如何去面对! 数据库设计中的五个范式 关于软件自动升级程序的设计方法 打印联纸报表时,出现每页都向下跳一点的问题?
在写自动更新程序中出现的问题
空中的风月 · 2005-05-18 · via 博客园 - 空中的风月

在设计本程序时,出现了两个问题:

第一:下载时,在本机可以实现,但是下载别的FTP时,就会出现产生不了文件的问题。

     解决方法: 原先使用的方法是:先打开一个文件,当接到数据后,把数据写到这个文件里,再接到再写的过程。等数据完成后,再把文件关闭,这时才产生文件。
     现在的方法更改为:先打开一个文件,当接到数据后,把数据写到文件里,并且关闭文件,这时就会产生文件。而等到再接到数据时,再打开这个文件,再写入,再关闭。
     当更改为后一种后,就不再出现这个问题了。 

第二:程序完成后,在本机可以运行,但是在别的机器上时,出现Run Time Error '429'错误。即ActiveX部件不能创建对象。
     
     这个问题是由于Winsock.Ocx控件本身的问题产生的,原因是目标计算机失去了注册信息。

The error occurs because the target computer is missing the license information for the control objects that are used in the application. You might attempt to set the project reference to point to MSWINSCK.ocx, and then generate a deployment package through the use of the Package and Deployment Wizard. This would generate a setup package that contains the correct version of the Winsock control. However, the license key for the control will not be compiled into the application unless an instance of the control is placed on a form. When you try to instantiate the objects at run time, the application has no way to provide the license key, and the code will fail. For example, the following code will run properly at design time, but will fail at run time on computers that do not have Visual Basic installed:

Dim myWinSock As MSWinsockLib.Winsock

Sub Main()
    ' Early binding does not work
    Set myWinSock = New MSWinsockLib.Winsock

    myWinSock.LocalPort = 5432

    myWinSock.Listen

    MsgBox ("Listening!")

    myWinSock.Close
End Sub

通过,下面这种方法,就可以解决这个问题。
Therefore, you must provide an instance of the Winsock control on a form so that Visual Basic can compile the license information into the application. You can make the form hidden if necessary. To do this, set the form's Visible property to "False." You can then prepare for deployment. The following code snippet demonstrates the method:

Dim myWinsock As MSWinsockLib.Winsock

Sub Main()
    ' Form1 is hidden
    Set myWinsock = Form1.myWinsock

    myWinsock.LocalPort = 5432

    myWinsock.Listen

    MsgBox ("Listening!")

    myWinsock.Close
End Sub