|
You already did this. The part you missed is that you didn't do any validation of the data in the textbox's before you assigned the values to your parameters. Your code just assumed that all the data will be valid, all the time.
You have to write code that checks the Text property of each textbox, converts it to the correct datatype expected by your parameters, and verify that each value is within acceptable ranges before you assign those values to the parameters.
|
|
|
|
|
Thank you Dave, that one i will Do it, Here is my code for the Procedure but has 1 error. please help me on the VBsite,am i going to create a parameter object for all the variables i have created in SQl and string variables in vb?
Create Procedure prcInserting @Num_key varchar(10),@Extension int,@Cell_ID int,
@Actual_Extent float,@Lis_key varchar(50), @Func_key varchar(8)
,@Active bit,@Add_date datetime,@Add_User_ID int,@Spatial_ADD_Date datetime
,@Rateable bit,@Non_Discreet_Valid bit
with recompile
as
insert into Propery(Num_key,Extension,Cell_ID,Actual_Extent,Lis_key,Func_key,Active,Add_date,Add_User_ID,Spatial_ADD_Date,Rateable,Non_Discreet_Valid,)
values (@Num_key,@Extension,@Cell_ID,
@Actual_Extent,@Lis_key, @Func_key
,0,getdate(),1,getdate()
,0,0)
Vuyiswa
|
|
|
|
|
Thank you Dave i saw my Error, here is the Correct code. Please help me with the VB6 side, am i going to create variables for all the variables declared in the Procedure ? and am i going to create a parameter Object for all variables created ?
Create Procedure prcInserting @Num_key varchar(10),@Extension int,@Cell_ID int,
@Actual_Extent float,@Lis_key varchar(50), @Func_key varchar(8)
,@Active bit,@Add_date datetime,@Add_User_ID int,@Spatial_ADD_Date datetime
,@Rateable bit,@Non_Discreet_Valid bit
with recompile
as
insert into Propery(Num_key,Extension,Cell_ID,Actual_Extent,Lis_key,Func_key,Active,Add_date,Add_User_ID,Spatial_ADD_Date,Rateable,Non_Discreet_Valid)
values (@Num_key,@Extension,@Cell_ID,@Actual_Extent,@Lis_key, @Func_key,0,getdate(),1,getdate(),0,0)
Thanks Man you are a Star, please help me on this one
Vuyiswa
|
|
|
|
|
This question was already answered a few hours ago. My answer isn't going to change. You absolutely NEED to validate the data in the textboxs and convert it to the appropriate types expected by your fields.
Like was said before, you're trying to assign a string to a numeric field, hence the error you're getting. Convert the string in the TextBox to a valid number BEFORE you assign it to your field.
|
|
|
|
|
hai all,
i am using .net 2003.i am doing my project in vb.net windows application to add and update person details like company name,contactperson,emailid,phoneno,etc..i want to edit a selected row in sql database through datagrid during runtime.plz help me.
Regards
Sathyanarayanan
|
|
|
|
|
The simplest version of this would just get the data you want to edit into a DataTable or DataSet object, bind the DataGrid to this DataTable, and let the user edit the data in the grid directly. When they're done, you can supply a button to save the information back to the database.
Getting the data is normally done using a DataAdapter to query the database and fill a DataTable or DataSet. When the user is done, call the Update method on the DataAdpater to write the changes back to the database.
|
|
|
|
|
try this one... its not for DataGrid.. this one works for MSFLEXGRID
Private Sub Form_Load()
Text1.Visible = False
End Sub
Private Sub MSFlexGrid1_Click()
If MSFlexGrid1.Col = 0 Then
Text1.Visible = True
With MSFlexGrid1
Text1.Left = .Left + .CellLeft
Text1.Height = .CellHeight
Text1.Width = .ColWidth(0)
Text1.Top = .Top + .CellTop
End With
Else
Text1.Visible = False
End If
End Sub
Private Sub Text1_Change()
With MSFlexGrid1
.TextMatrix(.Row, 0) = Text1.Text
End With
End Sub
The code is for editing the frst column of the grid...
The name is Sandeep.
|
|
|
|
|
hi
i want to know how to make our application to fit in our screen resolution change and screen size changelike any other software does.is there any article regarding this any ideas and suggestions
with regards
Balagurunathan.B
|
|
|
|
|
This is normally done through the approparite use of container controls, like the TableLayoutPanel, SplitContainer, and various others. Combine these with appropriate use of the Anchor and Dock properties on your controls to get the scaling and sizing effects you want.
It just takes some playing about with the controls properties to get the effects you want. There really isn't a single good source for this information, and even fewer examples. The stuff I've seen just explains the control properties Anchor and Dock and that's about it.
|
|
|
|
|
hi
i have done already the things wat you said me to do.
my problem is i am developping in 17 inch monitor if i load my program in 15inch then the application looks like a junk -- this one is the thing mainly i have to solve
another one is on different screen resolution how to make the application fit
with regards
Balagurunathan.B
|
|
|
|
|
I already told you how to do it.
|
|
|
|
|
Hi All,
I need to convert the html file to Doc, pdf, rtf using VB6.
Anyone guide me to do this one.
Thanks & Regards
Kumaran
|
|
|
|
|
www.activepdf.com has commercial server-based software.
www.primopdf.com has free desktop-based software (based on GhostScript).
There are a bunch of other products if you search on google.
|
|
|
|
|
Hi all,
I want to develop an level output meter like an 8 band equalizer. I saw some implementations to show a waveform, but this is not what I want. In the end the control should work like the winamp level meter. Has anybody an idea how to start?
Thanx!
mweingart
|
|
|
|
|
make it more clear.. which platform are u looking??
|
|
|
|
|
I'will try to make it more clear. I developed a little tool for organizing and playing mp3 albums and files. To play the files I'm currently using the media player control. All that I want is to visualize the currently played mp3 in an 8-band level meter.
I'm using Visual Studio Express 2005.
Need more information?
mweingart
|
|
|
|
|
It's called a "spectrum analyzer". This is actually going to be quite difficult to do. You can only use the data that is currently going through the audio mixer to feed the analyzer. Reading the MP3 file directly will do you no good because you can't tell where the current sound is in the file.
You can find an example of this here[^], but I'll warn you, it's not for the beginner.
You can also find more about them on Google, here[^] or even find libraries that can do this for you.
|
|
|
|
|
Hello all,
i want use a pdf files in vb.net, how can i work with a PDF files..
Thankx in advance
-Koolprasad2006
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
What do you want to do ? Showing them is fairly easy, if you embed IE in your app, it will do it. Creating them requires a third party library.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello frnd Christian Graus,
U said that the "Showing PDF files is fairly easy" please
can u give me the small code sample to show the PDF file in vb.net
plz help....Thanking you in advance
- koolprasad2006
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
hi,
I wish to edit the item in the listview with vb.net, then save it to databases! so, any one know of this? please help!
Regards,
charles
|
|
|
|
|
How r u making the listview control in the editing form?
|
|
|
|
|
A ListView isn't databindable, so that'll make this quite a bit more difficult. Why are you using ListView control? Why not a DataGridView?
It's possible to implement your own bindable version of the control, though. You can find an example here[^]. Warning! It's not something for beginners!
|
|
|
|
|
i need to convert input entered in textbox
txtdate into date i need to validate that
how do i do it
Vuyiswa
|
|
|
|
|
Hi Vuyiswamb
Try server side validation control, use date validation control, and use the "control to validate" property.
Hope it will help
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|