Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: incompatible types

$
0
0
I got an incompatible error in my method error COBCH0968 : Collection element has incompatible type In that  peace of  code "perform varying val through _where_", the compiler say the type Dictionary[type String type String] is incompatible with KeyValuePair[type String type String] to make the perform ( basicly the is the foreach command ).... method-id Update final public. working-storage section. 01 vals string. 01 val type KeyValuePair[type String type String]. procedure division using by value tableName as string _data_ as type Dictionary[type String type String] _where_ as string returning rtCode as type Boolean. declare strB = new StringBuilder(""). move true to rtCode. if(_data_::Count 1) perform varying val through _where_ invoke strB::Append(string::Format(" {0} = '{1}',", val::Key::ToString(), val::Value::ToString())) end-perform end-if. end method.

Viewing all articles
Browse latest Browse all 5819

Trending Articles