Cannot assign a variable declared as a string to a variable declared as data type 
Author Message
 Cannot assign a variable declared as a string to a variable declared as data type

I have declared a variable as string (like dim X as string) and another
variable as data type (like dim A as string * 5 and dim B as string * 10).
When I assign A=X, it gives me error about mismatch data type.  Any idea how
I can get around it?  I want to set up a data type to match the results
coming back from the string.  Right now I am doing B=mid(X,6,10) to get
around it.


Wed, 25 Jul 2001 03:00:00 GMT  
 Cannot assign a variable declared as a string to a variable declared as data type
Rset A = X
or
Lset A = X
Graham
===============
Quote:

> I have declared a variable as string (like dim X as string) and another
> variable as data type (like dim A as string * 5 and dim B as string * 10).
> When I assign A=X, it gives me error about mismatch data type.  Any idea how
> I can get around it?  I want to set up a data type to match the results
> coming back from the string.  Right now I am doing B=mid(X,6,10) to get
> around it.



Wed, 25 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Declaring Strings variable vs fixed

2. add data to table using variables declared in modules

3. Data variables declared at class level

4. Declaring variables within if statements

5. Declaring&initializing variables

6. Don't Know How to Publicly Declare Variable

7. How do I declare a static global variable ?

8. can't declare word object variable

9. Declaring Module variables

10. Declaring Variable Name

11. Can I use in VBScript object variable declared in VBA

12. Accesing a public variable declared in my macro

 

 
Powered by phpBB® Forum Software