Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 3 online users. » 1 Member(s) | 1 Guest(s) Google, MorrissgoX
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 508
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 805
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 821
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 919
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,080
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,461
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,880
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,690
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,699
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 16,012
|
|
|
MySQL / Wamp Server Issues |
Posted by: jaminben - 04-21-2012, 04:01 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (2)
|
|
Hi,
I've been successfully using the example code from your YouTube tutorials "How to implement a database into VB.NET" for quite sometime but for some reason I cannot get my code to work when I run my Wamp Server on another machine. I use exactly the same code with exactly the same database/setup as what I have locally on my dev PC and with free SQL hosting sites like db4free.net without issues.
Code: Imports MySql.Data.MySqlClient
Public Class Form1
Public conn As MySqlConnection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
conn = New MySqlConnection("server=localhost; user id=someuserid; password=somepassword; database=somedatabase")
Try
conn.Open()
Dim sqlquery As String = "SELECT * FROM useraccess where Username = 'someusername';"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() = True Then
If data(2).ToString = "somepassword" Then
MsgBox("Login")
Else
MsgBox("Failed Login")
End If
Else
MsgBox("Failed Login")
End If
End While
Catch ex As Exception
End Try
End Sub
End Class
The above code works fine for a local connection but if I were to change the connection to another PC running on my local network then it wont connect. The connection string would be something like:
Code: conn = New MySqlConnection("server=192.168.0.150; port=8080; user id=someuserid; password=somepassword; database=somedatabase")
I've tried changing ports, opened ports in my firewall, uninstalled / reinstalled changing server to pc name etc but nothing seems to work (Wamp Server is Set to Online).
I can connect fine to phpmyadmin using <!-- m --><a class="postlink" href="http://192.168.0.150:8080/phpmyadmin/">http://192.168.0.150:8080/phpmyadmin/</a><!-- m --> from any PC in my network but I just can't get the .NET code to connect.
So I'm all out of ideas and thought I'd post here to see if anyone else has any suggestions.... please... getting desperate now <!-- s --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="" title="Sad" /><!-- s -->
Thanks
Ben
|
|
|
please Help Me Vb sign up with MySql.Data.MySqlClient |
Posted by: hohoswithcans - 04-19-2012, 08:22 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (1)
|
|
please Help Me Vb this error on vb every time i launch the program and this is a sign in/ signup program
any when i sign up to my program this error it highlights
this : Code: data2 = command2.ExecuteReader()
and it tells me my.Sqlexcption was unhandled the reson why is : Code: Field 'Name' doesn't have a default value:
the full code is here : Code: If Not TextBox6.Text = "puilia" Then
MessageBoxEx.Show("Enter the Picture Box Right!", "Box", MessageBoxButtons.OK, MessageBoxIcon.Warning)
conn = New MySqlConnection("server=db4free.net;Port=3306; user id=code; password=code; database=code")
Dim username As Boolean = True
conn.Open()
Dim sqlquery As String = "SELECT * FROM code DB WHERE Username = '" & TextBox1.Text & "';"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() = True Then
MessageBoxEx.Show("Username Is In Use", "Username", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
username = False
data.Close()
Else
data.Close()
username = True
End If
End While
data.Close()
If username = True Then
Dim sqlquery2 As String = "INSERT INTO code (Username, Password)VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "')"
Dim data2 As MySqlDataReader
Dim command2 As New MySqlCommand
command2.CommandText = sqlquery2
command2.Connection = conn
adapter.SelectCommand = command2
data2 = command2.ExecuteReader()
data.Close()
End If
End If
please help me i need this for my real program plz someone help me
|
|
|
Html Stream |
Posted by: Blackrobot - 04-13-2012, 05:18 AM - Forum: Programming Help
- Replies (3)
|
|
Hello Guys,
i need some help with this Programm.
I want to incorporate the stream into the B1.
Code: <object type="application/x-shockwave-flash" height="300" width="400" id="live_embed_player_flash" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=matthias_mase_meyer" bgcolor="#000000"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" /><param name="flashvars" value="hostname=www.twitch.tv&channel=matthias_mase_meyer&auto_play=false&start_volume=25" /></object><a href="http://www.twitch.tv/matthias_mase_meyer#r=-rid-&s=em" class="trk" style="padding:2px 0px 4px; display:block; width:345px; font-weight:normal; font-size:10px; text-decoration:underline; text-align:center;">Watch live video from matthias_mase_meyer on www.twitch.tv</a>
And the chat in B2.
Code: <iframe frameborder="0" scrolling="no" id="chat_embed" src="http://twitch.tv/chat/embed?channel=matthias_mase_meyer&popout_chat=true" height="500" width="350"></iframe>
I hope someone can help me <!-- s --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt="" title="Wink" /><!-- s -->
|
|
|
Amnesia: The Dark Descent |
Posted by: brandonio21 - 04-07-2012, 03:48 PM - Forum: Gaming
- No Replies
|
|
Well, I have done it, I have completed the horror adventure game Amnesia: The Dark Descent. I have also written a review about it here:
<!-- m --><a class="postlink" href="http://devblog.brandonsoft.com/?p=33">http://devblog.brandonsoft.com/?p=33</a><!-- m -->
Check it out!
|
|
|
Tell About Yourself!! |
Posted by: Himansh - 04-07-2012, 01:42 AM - Forum: Off-Topic
- Replies (1)
|
|
Hi everybody
Here you are going to Tell something About yourself and your Daily Life routines so that we all start knowing each other.
Regards,
-Himansh
|
|
|
My Latest Website.Must Check this out!!! |
Posted by: Himansh - 04-07-2012, 01:41 AM - Forum: Your Sites!
- Replies (5)
|
|
Hi everybody
Today i am very Happy because Today i completed and uploaded My website.
You can check that out Here
<!-- m --><a class="postlink" href="http://pctech4upro.xtreemhost.com">http://pctech4upro.xtreemhost.com</a><!-- m -->
Please Give Feedback so that i can improve my site.
-Himansh
|
|
|
|