Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Creating table using ADOX in SQL Server

Hi,
I am making a table in SQL Server through ADOX(2.7) dll in VB. For connection i am using Provider = "SQLOLEDB.1"but when creating the table with adDate or adDBDate its giving error "Type is Invalid".
Can u suggest how to make table in SQL Server through ADOX with a DATE column..

Thanks,

Irfan

Comments

  • jlegjleg Member Posts: 237
    : Hi,
    : I am making a table in SQL Server through ADOX(2.7) dll in VB. For connection i am using Provider = "SQLOLEDB.1"but when creating the table with adDate or adDBDate its giving error "Type is Invalid".
    : Can u suggest how to make table in SQL Server through ADOX with a DATE column..
    :
    : Thanks,
    :
    : Irfan
    :
    The SQL syntax you should use is CREATE TABLE MyTable (Date1 DATE, Date2 DATE)

    Hope this helps

    John ;-)
  • irfans786irfans786 Member Posts: 12
    Thanks John,
    But in my case i have to use ADOX only.. any way i had solved the problem by using ADOX only and using adDBTimeStamp. which makes DateTime field in SQL Server

    Irfan

    : : Hi,


    : : I am making a table in SQL Server through ADOX(2.7) dll in VB. For connection i am using Provider = "SQLOLEDB.1"but when creating the table with adDate or adDBDate its giving error "Type is Invalid".
    : : Can u suggest how to make table in SQL Server through ADOX with a DATE column..
    : :
    : : Thanks,
    : :
    : : Irfan
    : :
    : The SQL syntax you should use is CREATE TABLE MyTable (Date1 DATE, Date2 DATE)
    :
    : Hope this helps
    :
    : John ;-)
    :

Sign In or Register to comment.