Home > Software engineering >  User-defined types not define how to solve
User-defined types not define how to solve

Time:09-20

 Private Sub Command1_Click () 
Dim strName As srting
StrName=Text1. Text
Adodc2. RecordSource="select * from employee table where name='" & amp; StrName & amp; "'
"Adodc2. Refresh
Frame2. Visible=True
End Sub

A run to here will prompt the user defined type undefined
I don't know how to solve

CodePudding user response:

Dim strName As srting

String types are: String
Your input is wrong!!!!!!!!!!



Words, this code USES ADO object, you refer to the corresponding library yet...

CodePudding user response:

What library? What needs to be reference library?

CodePudding user response:

Changed after check no results ah, how to do?

CodePudding user response:

reference 1st floor Chen8013 response:
Dim strName As srting

String types are: String
Your input is wrong!!!!!!!!!!



Words, this code USES ADO object, you refer to the corresponding library yet...

What library need to refer to

CodePudding user response:

U014444775
reference 4 floor response:
Quote: refer to 1st floor Chen8013 response:

Dim strName As srting

String types are: String
Your input is wrong!!!!!!!!!!



Words, this code USES ADO object, you refer to the corresponding library yet...

Need to refer to what library

Is the second line, srting you wrote the correct spelling is a string

CodePudding user response:

U014444775
reference 4 floor response:
Quote: refer to 1st floor Chen8013 response:

Dim strName As srting

String types are: String
Your input is wrong!!!!!!!!!!



Words, this code USES ADO object, you refer to the corresponding library yet...

Need to refer to what library

From the point of "Adodc2", "database control" seems to be use?
This is not what you need to have a reference library, add the control in engineering, it automatically adds the related references,

As for the "query results", I can not say what, I've never used it, he has no experience,

CodePudding user response:

To choose the menu "engineering" -- "components" (not sure menu name in Chinese, I am using English), in which the tick "Microsodt Data Control 6.0 (OLEDB)", determined, and then select the newly added up in the Control window ADODC, paint using the mouse controls in the form of contour, in the properties window, its name to Adodc2,

CodePudding user response:

...

CodePudding user response:

VB6.0 by use of data to create a new project, the reference, basic automatically control realization,


The form, add the required control code, connect to the database correctly,

CodePudding user response:

How is this post from a spelling mistakes get so complicated?
  • Related