Click here to Skip to main content
15,895,192 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Library not registered in excel 2013 vba Pin
MyOwnBoss7-Mar-14 13:10
MyOwnBoss7-Mar-14 13:10 
QuestionSend a Text Message to a Cell Phone from a VB.NET Application Pin
SURAJIT UPADHYAY13-Feb-14 18:56
SURAJIT UPADHYAY13-Feb-14 18:56 
AnswerRe: Send a Text Message to a Cell Phone from a VB.NET Application Pin
Richard MacCutchan13-Feb-14 21:54
mveRichard MacCutchan13-Feb-14 21:54 
AnswerRe: Send a Text Message to a Cell Phone from a VB.NET Application Pin
Simon_Whale13-Feb-14 22:21
Simon_Whale13-Feb-14 22:21 
GeneralRe: Send a Text Message to a Cell Phone from a VB.NET Application Pin
MyOwnBoss7-Mar-14 13:52
MyOwnBoss7-Mar-14 13:52 
QuestionCreating MySql views Pin
SPSandy12-Feb-14 17:40
SPSandy12-Feb-14 17:40 
AnswerRe: Creating MySql views Pin
Eddy Vluggen12-Feb-14 22:30
professionalEddy Vluggen12-Feb-14 22:30 
SuggestionRe: Creating MySql views Pin
Eddy Vluggen13-Feb-14 10:11
professionalEddy Vluggen13-Feb-14 10:11 
My apologies for the above answer; it may be correct, but it is hardly helpfull. Let me see if I can improve on the answer above. There's an abstract example of what you want to achieve below; (abstract as in it contains a bit pseudocode, not as "an abstract class")
VB.NET
    Public Sub CreateView()
        Using con As New MySqlConnection("your connection string here")
            Using cmd As MySqlCommand = con.CreateCommand()

                con.Open()
                cmd.CommandText = _
" CREATE VIEW view_name AS      " +
"      SELECT column_name(s)    " +
"        FROM table_name        " +
"       WHERE condition         "

                cmd.ExecuteNonQuery()
                con.Close() ' I don't close mine; the dispose handles that.

            End Using
        End Using
    End Sub

There are a few resources you might need;

I'd also recommend downloading at least VS2010; it comes with .NET 4, which performs a bit better than the 2.0 runtime. Also gives you some nice extra's, like mini-dumps in .NET - very powerfull when debugging with one o' those. There were also some nice language-enhancements in the IDE. An upgrade would well be worth the effort.

Since you'd be going to create views, I'd also like to point out that there are various options for naming those views. It'd be redundant to add the word "view" to it, but looking at other databases, it also looks like a tradition. MySQL does not allow some characters in the view-name. The W3Schools shows such an example with spaces.

Please don't do that. Just do it without spaces. It's not just MySQL that could blow up; furtherdown the line, there's probably an ORM or something generated from that view (like a report) and than that will blow up. Then the problem probably gets posted here, and I blow up.

Going offtrack a little further; for those wondering why I have a macro autofill the quotes to a single level - it makes it easy to cut & past the query into SQL Managment Studio (using block-select, ALT-SHIFT while you select text) and to paste it back into VS.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Creating MySql views Pin
SPSandy16-Mar-14 5:45
SPSandy16-Mar-14 5:45 
QuestionMake An Exe Inside My Panel Become Unmoveable Pin
EYESTRA1N11-Feb-14 4:12
EYESTRA1N11-Feb-14 4:12 
AnswerRe: Make An Exe Inside My Panel Become Unmoveable Pin
Chris Quinn11-Feb-14 4:41
Chris Quinn11-Feb-14 4:41 
AnswerRe: Make An Exe Inside My Panel Become Unmoveable Pin
EYESTRA1N11-Feb-14 5:13
EYESTRA1N11-Feb-14 5:13 
AnswerRe: Make An Exe Inside My Panel Become Unmoveable Pin
Dave Kreskowiak11-Feb-14 7:33
mveDave Kreskowiak11-Feb-14 7:33 
AnswerRe: Make An Exe Inside My Panel Become Unmoveable Pin
Eddy Vluggen11-Feb-14 8:29
professionalEddy Vluggen11-Feb-14 8:29 
GeneralRe: Make An Exe Inside My Panel Become Unmoveable Pin
EYESTRA1N11-Feb-14 18:11
EYESTRA1N11-Feb-14 18:11 
GeneralView Word Document in Vb.Net Form Visual Studio 2012 Pin
Danish198711-Feb-14 1:02
Danish198711-Feb-14 1:02 
GeneralRe: View Word Document in Vb.Net Form Visual Studio 2012 Pin
Richard Deeming11-Feb-14 1:13
mveRichard Deeming11-Feb-14 1:13 
GeneralRe: View Word Document in Vb.Net Form Visual Studio 2012 Pin
Danish198711-Feb-14 1:24
Danish198711-Feb-14 1:24 
GeneralRe: View Word Document in Vb.Net Form Visual Studio 2012 Pin
Eddy Vluggen11-Feb-14 3:02
professionalEddy Vluggen11-Feb-14 3:02 
QuestionPrintPreviewControl at Zoom In Page Right and Bottom Margin Spaces Not Appear?? Pin
Nicomendox10-Feb-14 10:33
Nicomendox10-Feb-14 10:33 
QuestionSms in Vb.net Pin
sadish69-Feb-14 19:59
sadish69-Feb-14 19:59 
AnswerRe: Sms in Vb.net Pin
Chris Quinn9-Feb-14 21:14
Chris Quinn9-Feb-14 21:14 
QuestionSelect statement with checkbox Pin
Gentry_389-Feb-14 17:48
Gentry_389-Feb-14 17:48 
AnswerRe: Select statement with checkbox Pin
Mycroft Holmes9-Feb-14 17:56
professionalMycroft Holmes9-Feb-14 17:56 
GeneralRe: Select statement with checkbox Pin
Gentry_389-Feb-14 18:23
Gentry_389-Feb-14 18:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.