|
nowdy wrote: cm_pink.CommandText = "insert into Branch ([Branch Name])" & _
"values (@branchname)"
This is the problem with concantenating string together. Like Christian pointed out, you're missing a space between the ")" and "values" in your resulting string, which looks something like this:
insert into Branch ([BranchN Name])values (@branchname)
which, in SQL, is a problem. There must be a space just before "values".
|
|
|
|
|
nowdy wrote: par1.Value = tb_branch_id.Text
Your other issue is this line. You might want to try validating the entered text AND convert it to an Integer before you try and assign it to the parameter value.
Dim branchId As Integer
If Integer.TryParse(tb_branch_id.Text, branchId) Then
' Create your parameter object and assign the value of
' branchId to it's Value property.
' Then you can do your query
End If
If the TryParse statement returns False, the text entered could not be converted to an Integer, invalidating your SQL lookup.
|
|
|
|
|
thank you Mr very mush i think that will help
& if i needed any thing i'll send you
best wishes
|
|
|
|
|
hello!!
i have to calculate difference of minutes in the samedate i used datediff function but it gives me wrong result
the syntax that i m using for datediff is as
datediff("n", dateval & " " & time1val ,dateval & " " & time2val)
plz help me out!!!
any sort of help will be highly appreciated
|
|
|
|
|
look into the timespan object
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
thanks a lot
it works fine with timespan
regards
|
|
|
|
|
Hi,
using VB .NET 2005, we have a ListView control and sometimes when there is no space left, scrollbars appears. What we need to do is to change the color of the scrollbars. For example to make them red. Any idea on how to do that ?
nink
|
|
|
|
|
There are no properties for the scrollbars in the standard controls. They render themselves using the colors define in the Display Properties control panel, under the Appearance tab.
You can replace the control's scrollbar with your own custom implementation, but is it really worth it??[^]
|
|
|
|
|
|
Hi i have a form and i put validation controls(required field validator ) to many controls..
and causes validation is true for the submit button..
On the local its working properly but when the upload te page online its giving error
"Object reference not set to an instance of an object. "
Its not performing the validations...
can some one help me out please
Hepsy
|
|
|
|
|
are you doing in asp.net
if yes then you are in wrong forum
if no then I dont understand how you can just upload one page in Desktop application?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
hepsy.i wrote: "Object reference not set to an instance of an object. "
This means that you're trying to use an object that your code assumed it either created or retrieved sucessfully. You're trying to do something like this:
Nothing.SomeMethod()
or
Nothing.SomeProperty = someValue
You can use a Nothing object...
|
|
|
|
|
Thank you Dave ..
But the problem is...............
I put validations(required field validators) for all the textbox....
when i click submit button......
its giving this error...
the first thing it should do is validations ......
and the first statement in the button submit event is page.validate()
but still it gives this error
"System.NullReferenceException: Object reference not set to an instance of an object."
Please help me
i'm not familiar with this
Hepsy
|
|
|
|
|
Well, are you handling any of the Validation events? Something in that code is assuming something it shouldn't be.
|
|
|
|
|
greetings again to you all,
guyz, again i need your help very very badly.
im successfull in creating textbox dynamically in the runtime.. but my problem now is how to get the data from the dynamic textbox...
code: creating textbox in runtime
While rd.Read
text = New TextBox
stForm.Controls.Add(text)
text.Visible = True
text.Name = "text" & CStr(xCnt)
text.Location = New Point(122 + (3 * xPnt), 135)
text.Size = New Size(60, 21)
text.MaxLength = rd.Item(0)
xCnt += 1
xPnt += 22
End While
after the code above it will display a number of textbox in the form, next is i will input some data in the displayed textbox....
my problem is How to get the data from the display textbox which was done at runtime?.....
your help is higly appreciated...
links/codes is highly appreciated..
start a new beginning in every ending; thats what life for......
|
|
|
|
|
may be you can access these textboxes like normal textboxes
the only difference between the two is that one is putted at designtime and another at runtime
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
tnx for the idea..
i already got the answer.... thank you... your help is very much appreciated...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: text.Name = "text" & CStr(xCnt)
In this line you're already giving textbox a name and to get a data of that text box just use that name, it's simple.
E.g.
dim txtVal as string = textxCnt.text
this should do it i guess...
|
|
|
|
|
hi all,
i want to extract all frames from Avi file. Anyone have idea how can i do this thing in vb.net
Any help will be greately appreciated
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
If you search the site, I know there are articles on doing this with DirectX
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi Christian,
i search the site & get multiple article but when i use the source code then all is failed at specific point for Particular AVI file(Exception in AVIStreamGetFrameOpen!). However same code for other AVI file it works well.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
OK, sounds like an issue in your AVI.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Either the AVI is currupted or you don't have the appropriate video codecs to decode the video stream.
|
|
|
|
|
i need to select row by index from database sql server
fro example i want to reterive row in the index 5
what the correct sql statemnet for that purpose
md_refay
|
|
|
|
|
Hi,
I don't understand what your question is.
However I am gathering that you want to retrieve a record by referencing an index in SQL.
In SQL you do not access the indexes, they are set up by you to enable faster querying of data.
SQL will determine which index to use based on the query you supply, which is why creating indexes is so important - create an index incorrectly and you will slow down processing.
Having said that you can drop hints on which index to use in SQL.
So having said all of this:
1 - is this of any help to you?
2 - you refer to index 5, what is index 5?
regards
Guy
You always pass failure on the way to success.
|
|
|
|