Topic: Information

Date 17/02/2011

By den

Subject needed for connecting the database(important)

Reply



For Jamie Holcom: i don’t know if there is a tutorial about how to do that, but it can be done, and yes, with a vb.net program or directly in your program – i have done one that . here’s some code
Dim conn1 = New MySqlConnection()
conn1.ConnectionString = “server=localhost;” & _
“user id=root;” & _
“password=” & ********
‘”;
‘Try
Dim myCommand As New MySqlCommand
Dim mySQLstr As String
Dim nume As String
Dim dialog As New OpenFileDialog
If dialog.ShowDialog = System.Windows.Forms.DialogResult.OK Then

nume = dialog.FileName.ToString
Dim fileContents As String
fileContents = My.Computer.FileSystem.ReadAllText(nume)
Try
mySQLstr = fileContents
conn1.Open()
myCommand.Connection = conn1
myCommand.CommandText = mySQLstr
myCommand.ExecuteNonQuery()
conn1.Close()
MsgBox(“Baza de date a fost creata!”)
Catch myerror As MySqlException
MsgBox(“Eroare: ” & myerror.Message)
Finally
If conn1.State ConnectionState.Closed Then conn1.Close()
End Try
End If

it will open a dialog to chose the sql file containing the structure
of course it can be automated.
ATTENTION: Do not specify the database in the connection string.

Date 17/02/2011

By den

Subject backup data site

Reply

https://www.dreamincode.net/forums/topic/149554-how-to-create-automated-backup-files-in-vbnet-application/

Date 17/02/2011

By den

Subject fill datagridview with dataset

Reply

dim query as string="Select * from table"

dim da as new oledbdataadapter(query,con)

dim ds as new dataset

da.fill(ds,"Table")

me.dgv.datasource=ds
me.dgv.datamember="Table"

ds.dispose

con.close

Date 15/02/2011

By den

Subject deployment and creating a standalone software website

Reply

https://www.dreamincode.net/forums/topic/92266-deployment-of-database-with-the-application-software/

Date 10/02/2011

By den

Subject atm software engineering example

Reply

https://www.math-cs.gordon.edu/courses/cs211/ATMExample/

Date 03/02/2011

By den

Subject connection string in database

Reply

https://www.connectionstrings.com/

https://www.vkinfotek.com/connectionstring.html

Date 31/01/2011

By den

Subject for printing listview and datagridview

Reply

https://www.knowdotnet.com/articles/printgriddemo.html

Date 31/01/2011

By den

Subject tutorials(docking,autoscroll)

Reply

https://www.codeproject.com/KB/books/vbdotnetkickstart.aspx

Date 31/01/2011

By den

Subject text to string builder important

Reply

Private Function GenerateVBStringBuilderCode() As String
Dim s As String
Dim sb As New StringBuilder(5000)
'Append StringBuilder declaration
sb.Append("Dim sb As New System.Text.StringBuilder(5000)")
sb.Append(vbCrLf)
For Each s In Me.tbSource.Lines
'Append each line
sb.Append("sb.Append(""")
sb.Append(EscapeString(s))
sb.Append(""")")
sb.Append(vbCrLf)
If Me.cbPreserveCRLF.Checked Then
'Append a vbCrLf if new lines are to be preserved
sb.Append("sb.Append(vbCrLf)")
sb.Append(vbCrLf)
End If
Next
Return sb.ToString
End Function

Private Function GenerateCSharpStringBuilderCode() As String
Dim s As String
Dim sb As New StringBuilder(5000)
'Append StringBuilder declaration
sb.Append("System.Text.StringBuilder sb = new System.Text.StringBuilder(5000);")
sb.Append(vbCrLf)
For Each s In Me.tbSource.Lines
'Append each line
sb.Append("sb.Append(@""")
sb.Append(EscapeString(s))
sb.Append(""");")
sb.Append(vbCrLf)
If Me.cbPreserveCRLF.Checked Then
'Append a vbCrLf if new lines are to be preserved
sb.Append("sb.Append(Environment.NewLine);")
sb.Append(vbCrLf)
End If
Next
Return sb.ToString
End Function

Private Sub CopyToClipboard()
'Put the generated code on the clipboard
Try
Clipboard.SetDataObject(Me.tbResult.Text)
Catch
MessageBox.Show("The code could not be copied to the clipboard.", "Error Copying to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
End Try
End Sub

Private Function EscapeString(ByVal source As String) As String
'Escape(double) any quotes that appear in the text
If Not source Is Nothing Then
Return source.Replace("""", """""")
Else
Return String.Empty
End If
End Function

Private Sub btnGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerate.Click
If Me.rbVB.Checked Then
Me.tbResult.Text = Me.GenerateVBStringBuilderCode
Else
Me.tbResult.Text = Me.GenerateCSharpStringBuilderCode
End If
End Sub

Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
Me.CopyToClipboard()
End Sub

Date 31/01/2011

By den

Subject need website for tutorials

Reply

https://www.knowdotnet.com/windowsforms.html

Poll

What is you favorite Programming Languages?

Total votes: 540