troubleshooting Question

VB ADODB.Connection - Execute very Long Update, some are ignore.

Avatar of mSchmidt
mSchmidt asked on
Microsoft SQL ServerVisual Basic Classic
5 Comments1 Solution643 ViewsLast Modified:
Hi

I have an SQL which looks like the one below, however it is far longer.

I Execute it from VB6 using something like this:
    Dim con As ADODB.Connection
    Set con = cnxn
    con.Execute (sqlStr)
    con.Close
    Set con = Nothing

I have tried taking the SQL and copying it into SQL Management Studio and here it execute fine.
The thing is that the first UPDATES go through fine however the last ones dont and i do not get an error.

Is there a Limit to how long an SQL can be ?
Should i be doing this some other way ?

UPDATE t_vare SET vare_nettopris=4.01 WHERE vare_id=3056;UPDATE t_vare SET vare_nettopris=4.84 WHERE vare_id=3057;UPDATE t_vare SET vare_nettopris=4.48 WHERE vare_id=3058;UPDATE t_vare SET vare_nettopris=11.06 WHERE vare_id=3059;UPDATE t_vare SET vare_nettopris=3.67 WHERE vare_id=3060;UPDATE t_vare SET vare_nettopris=4.47 WHERE vare_id=3070;UPDATE t_vare SET vare_nettopris=8.88 WHERE vare_id=3073;UPDATE t_vare SET vare_nettopris=3.67 WHERE vare_id=3074;UPDATE t_vare SET vare_nettopris=6.9 WHERE vare_id=3223;UPDATE t_vare SET vare_nettopris=13.82 WHERE vare_id=3224;UPDATE t_vare SET vare_nettopris=8.15 WHERE vare_id=3240;UPDATE t_vare SET vare_nettopris=4.81 WHERE vare_id=3241;UPDATE t_vare SET vare_nettopris=7.72 WHERE vare_id=3245;UPDATE t_vare SET vare_nettopris=2.02 WHERE vare_id=3252;
ASKER CERTIFIED SOLUTION
x77

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 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 1 Answer and 5 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