how can i limit the data size while entering to the database ?

20 pts.
Tags:
Microsoft Excel
VB
Visual Basic
how can i limit the data size while entering to the database from Excel sheet using vb6?

Answer Wiki

Thanks. We'll let you know when a new response is added.

For strings being placed into the database, you can use the Mid() function to get only a certain portion of a string. And you could use a series of if greater than (>) or less than (<) statements to limit the size of a number in a If elseif statement.

If you’re not doing some client side data validation the real challenge you have is, “What to do with the left overs”. For example, this string is being placed into a field but I only want the first 10 characters:
<b>Now is the time for all men to come to the aid of their fellow countrymen.</b>

Which, of course, becomes:
<b>Now is the</b>

But what do you do with this part:
<b> time for all men to come to the aid of their fellow countrymen.</b>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following