TFPTECH's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 6 (0.02 per day)
- Joined:
- 15-August 12
- Profile Views:
- 206
- Last Active:
Jan 04 2013 03:23 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Run-time error'40002'
Posted 17 Aug 2012
-
In Topic: ERROR: user-defined type not defined
Posted 16 Aug 2012
'this is my code and the ERROR IS: user-defined type not defined, it has got red lines in it also 'THIS LINE IS HIGHLIGHTED YELOW Private Sub cmdSave_Click() 'THIS LINE IS HIGHLIGHTED BLUE Dim conn As New MySqlConnection Dim cmd As New MySqlCommand Dim SQL As String ' set up a remote data connection ' using the MySQL ODBC driver. ' change the connect string with your username, ' password, server name and the database you ' wish to connect to. conn.CursorDriver = rdUserOdbc conn.Connect = "uid=root;pwd=moses12;server=localhost:3306;" & _ "driver={MySQL ODBC 3.51 Driver};database=SRMS;" conn.EstablishConnection ' set up a remote data object query ' specifying the SQL statement to run. ' let me try 'Try SQL = "insert into regstudent (n_Student, age, sex, nationality, p_birth, d_birth, religion, f_name, tel,occupation, w_place, F_address, m_name, tel2, occupation2, w_place2, F2_address, prev_school, Location, grade_attained, aggregates, code) values (?Text1, ?Text2, ?Text3, ?Text4, ?Text5, ?Text6', ?Text7, ?Text8, ?Text9, ?Text10, ?Text11, ?Text12, ?Text13, ?Text14, ?Text15, ?Text16, ?Text17, ?Text18, ?Text19, ?Text20, ?Text21, ?Text22)" 'MsgBox (SQL) cmd.Connection = conn cmd.CommandText = SQL cmd.ExecuteNonQuery MessageBox.Show("A student has successfuly been registered", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterist) 'THIS PART OF THE CODE IS RED Catch ex As Exception MessageBox.Show("There was an error: " & ex.Message, "Error", _ MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub -
In Topic: ERROR: user-defined type not defined
Posted 16 Aug 2012
'this is my code and the ERROR IS: user-defined type not defined, it has got red lines in it also P[color="#FFFF00"]rivate Sub cmdSave_Click()[/color] Dim conn [color="#0000FF"]As New MySqlConnection[/color] Dim cmd As New MySqlCommand Dim SQL As String ' set up a remote data connection ' using the MySQL ODBC driver. ' change the connect string with your username, ' password, server name and the database you ' wish to connect to. conn.CursorDriver = rdUserOdbc conn.Connect = "uid=root;pwd=moses12;server=localhost:3306;" & _ "driver={MySQL ODBC 3.51 Driver};database=SRMS;" conn.EstablishConnection ' set up a remote data object query ' specifying the SQL statement to run. ' let me try 'Try SQL = "insert into regstudent (n_Student, age, sex, nationality, p_birth, d_birth, religion, f_name, tel,occupation, w_place, F_address, m_name, tel2, occupation2, w_place2, F2_address, prev_school, Location, grade_attained, aggregates, code) values (?Text1, ?Text2, ?Text3, ?Text4, ?Text5, ?Text6', ?Text7, ?Text8, ?Text9, ?Text10, ?Text11, ?Text12, ?Text13, ?Text14, ?Text15, ?Text16, ?Text17, ?Text18, ?Text19, ?Text20, ?Text21, ?Text22)" 'MsgBox (SQL) cmd.Connection = conn cmd.CommandText = SQL cmd.ExecuteNonQuery MessageBox.Show("A student has successfuly been registered", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterist) [color="#FF0000"] 'Catch ex As Exception 'MessageBox.Show("There was an error: " & ex.Message, "Error", _ 'MessageBoxButtons.OK, MessageBoxIcon.Error) 'End Try[/color] End Sub
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Click here to e-mail me
Friends
TFPTECH hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
TFPTECH has no profile comments yet. Why not say hello?