2

I am wondering is there some limitation on the length of the text I can give to CommandText field ?

I am using MySqlConnection and MySqlCommand.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
Night Walker
  • 20,638
  • 52
  • 151
  • 228

1 Answers1

1

Check this link Mysql Dataprovider

Commandtext property defined as

public string CommandText {get; set;}

So limitation is same as limitation of length of a string. Check this post for string length limitation What is the maximum possible length of a .NET string?

Community
  • 1
  • 1
Rahul
  • 76,197
  • 13
  • 71
  • 125
  • 1
    I am afraid this is not correct. Just try to execute a command with a very long string and check. It will be truncated and cause exception – FindOutIslamNow Jul 24 '17 at 12:40
  • @FindOutIslamNow, post a separate question for this with your findings, exception and sample code as to what have you tried. fyi, size is limited by hardware configuration – Rahul Jul 24 '17 at 12:46