[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error when passing an argument to a vb6 that contains  '/'

Posted on 2016-11-07
7
Medium Priority
?
77 Views
Last Modified: 2016-11-09
Noticed an error message that happened in our sql tables scripts but now in our vb6 when passing arguments to the apps:

Run-time error '-2147217900 (80040e14)':
Column name or number of supplied values does not match table definition.

Open in new window


We use a vba to call a vb6 apps:

x = Shell("path\vbapps.exe 125, 1 " & ArgumentVaribale1 & "," & ArgumentTransNo, vbNormalFocus)

Open in new window


The problem occurs when the transaction number has a "/" in it's value, for example "TRANS/NO-090909".

How can we fix this (the table is full of columns with this character)?
0
Comment
Question by:rayluvs
  • 4
  • 3
7 Comments
 
LVL 50

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 41877903
Use Replace to replace all / with // when you send it and change it back when you receive it.
0
 

Author Comment

by:rayluvs
ID: 41877920
Will try, but why does this happens when it's only argument that are passed?

And what if the user decided sets the code to "TR////ANS/NO-09//09///09"?

Is theer another way to pass values when a"/" is presents besides using replace?
0
 
LVL 50

Expert Comment

by:Martin Liss
ID: 41877924
If you have the code for the sending program you could validate the "code" and not allow "/".
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:rayluvs
ID: 41877950
Understand that part, but why does this happens when it's only argument that are passed?
0
 
LVL 50

Expert Comment

by:Martin Liss
ID: 41877972
I don't know.
0
 

Author Closing Comment

by:rayluvs
ID: 41881222
Would have been great to know the "why" of this problem.

Anyways, thanx!
0
 
LVL 50

Expert Comment

by:Martin Liss
ID: 41881255
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question