Use ADO and execute the statment just as if you are Query Analyzer (I'm using MS SQL Server with ADO)
I executed the following SQL statement through VB and added the field sTestCol. (ADOExecuteSQL is in a module that has my connection code) In a command click event: Dim strSql As String strSql = "alter table testprevention.dbo.tblhistory Add sTestCol NVARCHAR(50) NULL" ADOExecuteSql (strSql) --- woo setlan <[EMAIL PROTECTED]> wrote: > if yes, how?? any hints?? thanks a lot > > Matt <[EMAIL PROTECTED]> wrote: > ----- Original Message ----- > From: "setlan83" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Wednesday, June 08, 2005 3:29 PM > Subject: [vbhelp] About Database > > > > Is there any code in the vb so i can add a field > to the database juz > > from the vb program??? > > > Yes > > > > '// > ======================================================= > Rules : > http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > > ======================================================= > Post : [email protected] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// > ======================================================= > > > > > --------------------------------- > Yahoo! Groups Links > > To visit your group on the web, go to: > http://groups.yahoo.com/group/vbhelp/ > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the > Yahoo! Terms of Service. > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > > [Non-text portions of this message have been > removed] > > > > __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
