|
Hello,
Thanks for the reply.
However, that is not really the solution I was looking for.
The only thing i have found out is to do this:
<br />
Me.bsOrderDetailsPending.RaiseListChangedEvents = False<br />
however, by doing this the datagridview doesn't work as well.
Thanks for any more suggestions,
Steve
|
|
|
|
|
i had to add a help file...can any one guide me how to create help files in windows application
thank u
|
|
|
|
|
|
Hi
I have the following function which takes a very large input string from my asp page and passes it into a stored procedure, it all compiles a runs correctly through to executing a the query where it throws the exception - input string was not in correct format
any help much appreciated
boyindie
this is the code for my procedure
DELIMITER $$<br />
CREATE DEFINER=`jshort`@`localhost` PROCEDURE `sp_insert`(IN p_firstname varchar(20) ,IN p_middlename varchar(30), IN p_lastname VARCHAR(20),IN p_email VARCHAR(200),IN p_telNO INTEGER(16),IN p_mobNo INTEGER(16),IN p_faxNo INTEGER(16),IN p_houseName varchar(50), in p_houseNo Int(4), in p_strAdr varchar(200), in p_stradr1 varchar(200),in p_stadr2 varchar(200), in p_city varchar(50), in p_area varchar(50), in p_country varchar(50),in p_postcode integer(12))<br />
BEGIN<br />
<br />
Insert into user_details(user_Firstname, user_middleName, user_LastName, user_email, user_fax, user_tel, user_mobile) Values (p_firstname, p_middlename, p_lastname, p_email, P_telNo,P_mobNO,P_faxNo);<br />
<br />
INsert into user_addresses(address_house_name, address_house_no, address_address, address_extra1, address_extra2, address_city, address_area, address_county, address_postcode) VALUES (p_housename, p_houseNo, p_strAdr, p_strAdr1, p_strAdr2, p_city, p_area, p_country, p_postCode);<br />
<br />
END $$<br />
DELIMITER ;<br />
<br />
<br />
and I have the following code for inputing into
<br />
'Set command string to equal SPROC<br />
cmdString.CommandText = "sp_Insert"<br />
'ONLY PLACE THIS IF SPROC, sets the command to a SPROC<br />
cmdString.CommandType = CommandType.StoredProcedure<br />
<br />
Dim param As New MySqlParameter<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_firstname", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtFirstname.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_middlename", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtMiddleName.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_lastname", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtLastName.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_email", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtEmail.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_telNo", MySqlDbType.Int64)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtTelNo.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_mobNo", MySqlDbType.Int64)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtMobNo.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_faxNo", MySqlDbType.Int64)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtFaxno.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_houseName", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtHouseName.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_houseNo", MySqlDbType.Int64)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtHouseNo.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_StrAdr", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtStreetAdd.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_strAdr1", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtAdressE1.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_stAdr2", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtAdressE2.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_city", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtCity.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_country", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtCountry.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_area", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtArea.Text<br />
<br />
'Creats paramter to send to SPROC<br />
param = cmdString.Parameters.Add("?p_postcode", MySqlDbType.VarChar)<br />
'Sets parameter type to input parameter<br />
param.Direction = ParameterDirection.Input<br />
'Sets parameter value to text box<br />
param.Value = txtPostCode.Text<br />
<br />
<br />
<br />
<br />
'Insert the records into the database<br />
connection.Open() 'Opens Database Connection<br />
cmdString.ExecuteNonQuery() 'Executes procedure<br />
connection.Close() 'Closes connection<br />
<br />
Catch ex As Exception<br />
litErr.Text = ex.Message<br />
MsgBox(ex.Message) 'Shows error message as messagebox<br />
<br />
End Try<br />
End Sub<br />
<br />
|
|
|
|
|
PROBLEM SOLVED WAS MULTITUDE OF ERRORS
|
|
|
|
|
hi i cant find the query builder in visual basic express edition could someone point me in the right direction 2 find it cheers
|
|
|
|
|
Query Builder doesn't show up as a seperate option. You will only get that option in a place where it is appropriate, usually in one of the dialogs, for say, creating a DataSet or TableAdapter.
|
|
|
|
|
if i have 2 forms ...
at first i am accesing 1 form and minised...at the same time shall i open another form...
please send the code soon
if anybody knows
thanks & regards.
|
|
|
|
|
What exactly is your question/ problem???
Regards,
Nilesh.
|
|
|
|
|
May i have please more specific question.?
|
|
|
|
|
Hi,
It seems that you are planning to build a switch menu, if this is the case:
This is a tricky way
In form 1 > Button (or whatever):
Dim f as New Form2
Me.Hide
f.ShowDialog
Me.Show
Hope this will help
NajiCo http://www.InsideVB.NET[^]
It's nice 2b important, but it's more important 2b nice...
|
|
|
|
|
How i can use Microsoft Forms 2.0 controls like combox in vb 6 i fill combobox with list. how i fill it in vb.net 2005
In VB6 Me.CboCust.List=MyCustArray
In VB.Net Me.CboCust.Set_List(? , ? , ?)
What is the syntax of Set_List()

|
|
|
|
|
Hi,
CboCust.Items.Add("...")
You could add object too:
Public Class Customers
Public FullName As STring
Public Overrides Function Tostring () As String
Return FullName
End Function
End Class
Dim oCust as New Customer
oCust.FullName = "Naji El Kotob"
CboCust.Items.Add(oCust)
for more details got to msnd2.microsoft.com and search for "ComboBox"
Good Lcuk
NajiCo
It's nice 2b important, but it's more important 2b nice...
|
|
|
|
|
Thanks but the is no Items.Add property. I am talking about Microsoft Forms2 Control Which is used is MS Access.
|
|
|
|
|
Hi
How to pass multiple value to next using session ,
i am having infragistic grid its having emp-id ,name,checkbox
i want to pass the checked value to next page, can please help me .if u give code thts better
In advance thanks
|
|
|
|
|
Hi,
u can send data to the next page using querysting.
or u can take session for each item.
|
|
|
|
|
I have an example:
Form 1: contains 1 textbox and 1 button
Question:
How can I use the value i inputed on the textbox on form 1 on form 2?
Like for example:
Form 1:
private sub button1_click
dim str as string
str = textbox1.text
end sub
Form 2:
i want to use the value of str to my form 2. How can I retrieve it?
|
|
|
|
|
dienadel wrote: How can I use the value i inputed on the textbox on form 1 on form 2?
How to pass values between forms[^]
dienadel wrote: i want to use the value of str to my form 2. How can I retrieve it?
Retrieve it to where? Back to form1? Same process, but in reverse.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
|
OOPS!!! sorry! that link was already posted.... Didn't see it!!!
|
|
|
|
|
Hi,
There are many ways, but this will be a good one:
In form 2:
Public MyValue As String
In form 1:
Dim f as new Form2
f.MyValue = str
f.Show
Now in form 2 you can simple process the value of MyValue variable.
Hope this will help!
NajiCo http://www.InsideVB.NET[^]
It's nice 2b important, but it's more important 2b nice...
|
|
|
|
|
Naji El Kotob wrote: There are many ways, but this will be a good one
I'll have to disagree on that one. Destroying encapsulation by making a class field public is rarely a good idea.
See these two articles for a discussion on the subject:
* Why make fields in a class private, why not just make them public?[^]
* The public fields debate again[^]
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Thanks man the code is correct.
One more thing can i store this value to a properties for example:
public properties you()
get
return textbox.text
end get
set (byval value as string)
textbox.text = value
end set
|
|
|
|
|
Please read the forum guidelines.
Highlights include making your message title have meaning. Everyone here needs help.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
leckey wrote: Highlights include making your message title have meaning.
Yes. I find that using the < pre > ... < / pre > with the < code > ... < / code > tags makes it much more readable.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|