0

Using VB6, MSSqlServer and ADOX, I need to create a field to store large text, and to use varchar (MAX).
A [DefinedSize] property of ADOX is long.
I would like to know how to set this field to varchar(max) on create.

A exemple of my code:

Case "dbText", "10"
    coluna.Type = adVarChar
    coluna.DefinedSize = HERE I DON'T KNOW
  • 2
    the max data type didn't exist at the time that VB6 was in its prime, so there is not a direct conversion. There may be some hacky workarounds... – Jeremy Mar 31 '17 at 15:59
  • 1
    You won't be able to do this with ADOX, as @Jeremy points out. You could craft and execute a DDL query to create the object(s). – MarkL Mar 31 '17 at 16:45
  • ADOX is a Jet-oriented library. I doubt it can do much at all with SQL Server. – Bob77 Apr 01 '17 at 19:59
  • Yes, I walked around this using query to create this field. Thanks you all. – Odilton Junior Apr 03 '17 at 13:41

0 Answers0