Home > Software engineering >  Posting again: vb6 under XP ADO2.8, no response under Windows 7
Posting again: vb6 under XP ADO2.8, no response under Windows 7

Time:09-27

Originally posted at: http://bbs.csdn.net/topics/390804433
I use VB6 under XP system, reference ADO2.8, wrote a link SQL2000 code, under the XP running without any problems, but must wait 30 seconds under the Windows 7 there will be, in the meantime, shown on the program interface is no response, the system is a new outfit, Windows 7 64 - bit and 32-bit version is always the same, then there is a very strange thing, I put the program in the same virtual machine installed Windows 7 is very normal, who have also come across this problem??? Help!
The code is as follows:
Public cn As New ADODB. Connection
Public Rs As New ADODB. You

Private Sub Command1_Click ()
On Error GoTo err_1
Cn. The ConnectionString="driver={SQL Server}; Server=0.0.0.0, port number; Uid=; The PWD=; The database=* * "

Cn. Open
Cn. The Execute (" select * from czry ")
Cn. Close


Err_1:
If Err. Number=0 Then
MsgBox "OK"
The Else
MsgBox "Error"
End the If
End Sub

Private Sub Command2_Click ()
Adodc1. The ConnectionString="Provider=sqloledb; The Data Source=0.0.0.0, port number; Network Library=DBMSSOCN; Initial Catalog=* *; User ID=; Password=;"
Adodc1. RecordSource="select * from CGD"
Adodc1. Refresh
The Set DataGrid1. The DataSource=Adodc1
DataGrid1. Refresh
End Sub

According to tip zhao4zhong1 wrote an alias, procedure when running normally, but after I put the computer operating system reinstall, also wrote an alias, ODBC, but useless, or the same as the original

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.

Configuration of 32 bit DSN and alias to use
C: \ Windows \ syswow64 \ odbcad32 exe
C: \ Windows \ syswow64 \ cliconfg exe

CodePudding user response:

 cn. The ConnectionString="driver={SQL Server}; Server=alias; Uid=database user name; The PWD=database user login password; The database the default database name="

CodePudding user response:

The cn in your code. The ConnectionString is made, yao, don't change the ha!

CodePudding user response:

reference 1st floor zhao4zhong1 response:
under the 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.

Configuration of 32 bit DSN and alias to use
C: \ Windows \ syswow64 \ odbcad32 exe
C: \ Windows \ syswow64 \ cliconfg exe

First, I put SYSWOW64 OCX files are the following, the second, I configure an alias and ODBC is SYSWOW64 below

CodePudding user response:

The
reference 3 floor zhao4zhong1 response:
cn in your code. The ConnectionString is yao made of steel, don't change the ha!

Very clear tell you, you say this in alias method was useless, I configured under SYSWOW64 alias, then use alias in the ADO connection, useless

CodePudding user response:

reference 5 floor yuhaoxiang reply:
Quote: refer to the third floor zhao4zhong1 response:

The cn in your code. The ConnectionString is made, yao, don't change the ha!

Very clear tell you, you say this in alias method was useless, I configured under SYSWOW64 alias, then use alias in the ADO connection, useless

But I'm here useful,
You first try to use the query analyzer USES configured alias not good, if the query analyzer that, is the problem your program; Is if the query analyzer, it is not your program problem but the problem of configuration,
Note: the query analyzer May 64/32 bits,

CodePudding user response:

When you install MDAC28
As an administrator to run
In XP compatibility mode

Your VB6 program is similar,

CodePudding user response:

1, mdac2.8 in Windows 7 is installed, because Windows 7 bring mdac6, 2, and I also tried to run compatibility mode, and is an administrator to run 3, I under a sql2000 query analyzer, run on Windows 7, I have appeared in the process of problem, your problem is the system configuration, installation which where the problem is, 4, with a CD, I won't appear in the virtual machine to produce it this problem, which the configuration on the where?

CodePudding user response:

SQL problem, problem solving, in fact, the problem is not also not vb6 program problem, but about the network of the Windows 7, you can go to consult this: http://social.technet.microsoft.com/Forums/windows/ar-SA/556174e8-660b-4a6a-b6a2-6632c0b017ba/sql-server-query-extremely-slow-on-new-windows-7-pc? Forum=w7itprogeneral

CodePudding user response:

Arabic!

CodePudding user response:

Leave a mark, after the reference, vb database under the Windows 7, much slower than xp

CodePudding user response:

references 9 f yuhaoxiang response:
problem solving, this problem is not the problem of SQL, nor vb6 program problem, but about the network of the Windows 7, can go to consult this: http://social.technet.microsoft.com/Forums/windows/ar-SA/556174e8-660b-4a6a-b6a2-6632c0b017ba/sql-server-query-extremely-slow-on-new-windows-7-pc? Forum=w7itprogeneral

May I have your specific is how to solve?? Don't understand you hair's web site, can you specifically about the solution, you this question, I also met, vb program, under the xp journey, under the Windows 7, querying data, always card (just like a crash), just run, although the result is no problem, but always feel uncomfortable

CodePudding user response:

references 9 f yuhaoxiang response:
problem solving, this problem is not the problem of SQL, nor vb6 program problem, but about the network of the Windows 7, can go to consult this: http://social.technet.microsoft.com/Forums/windows/ar-SA/556174e8-660b-4a6a-b6a2-6632c0b017ba/sql-server-query-extremely-slow-on-new-windows-7-pc? Forum=w7itprogeneral


nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related