Mysql-native need some help please

Lars Johansson lasse at 11dim.se
Sat Jan 17 16:15:50 UTC 2026


     I'm exploring ways of accessing mysql and are now trying 
mysql-native I have the following code:
     range = conn.query("Show processlist");
     	foreach (rad; range){
     		writeln(rad[6]);
     		}
     	}

     now I want to test if rad[6] begins with "start", like this:
     range = conn.query("Show processlist");
     	foreach (rad; range){
     	//	string stat = cast (string) rad[6];
     		if (rad[6].startsWith("start")){
     			writeln("match");
     		}
     	}

whatever I try casting or comparing I'm stuck on errors pointing 
out I cannot cast/convert `VariantN!32LU` to string.

I assumed an element range[] should be of type 'string', but it 
seems to be of type `VariantN!32LU` whatever that is.
I really need help. I'm stuck.




More information about the Digitalmars-d-learn mailing list