troubleshooting Question

VB type mismatch error in powerdesigner- probably very simple

Avatar of DirkVerdonck
DirkVerdonck asked on
Visual Basic ClassicSybase Database
7 Comments2 Solutions961 ViewsLast Modified:
I have a problem with some visual basic code that has to be executed on a powerdesigner model.
If I execute this it gives me a "type mismatch" error on line 9  (first SQL)

this is probably something really stupid, but I'm not a VB programmer and I don't have a lot of time for this script, so any help would be very welcome.

dim sql_text
sql_text = ""
dim counter
counter = 0
for each tbl in mdl.tables
  for each fld in tbl.columns
    if (  fld.stereotype <> "" ) then
       counter = counter + 1
       sql_text = sql_text + "insert into database.fieldNames(id,name,tablename,datatype)" 
       sql_text = sql_text + "values (" + counter + "," + fld.Name + "," + tbl.Name + "," + fld.DataType + ")" + vbCrLf
    END IF
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros