|
anybody plzzzz help
when i enter a name and password in my text box then, how can i identify is it exist in our server
(intranet) using Vb.net windows application,if it not exist then "invalid user message" display on the label error.if it exist then go to product page
greetings
|
|
|
|
|
Server Error in '/Log_In' Application.
--------------------------------------------------------------------------------
The name 'adamtel' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: The name 'adamtel' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Source Error:
Line 158: .Connection.Open()
Line 159: .CommandText = stSQL
Line 160: milestone_Rows = .ExecuteNonQuery()
Line 161: If milestone_Rows <> 1 Then
Line 162: MsgBox("Did not insert row")
Source File: C:\Inetpub\wwwroot\Log_In\milestone.aspx.vb Line: 160
Stack Trace:
[OleDbException (0x80040e14): The name 'adamtel' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.]
System.Data.OleDb.OleDbDataReader.NextResults(IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command)
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
Log_In.milestone.milestoneAdd() in C:\Inetpub\wwwroot\Log_In\milestone.aspx.vb:160
Log_In.milestone.btnadd_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Log_In\milestone.aspx.vb:125
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
|
|
|
|
|
To me this sounds like you have a problem with your sql query syntax
|
|
|
|
|
yeah, that's rite, i have sql queries problems
thanks Gavin
|
|
|
|
|
Hi all,
Hope this is an easy one...
Here is the problem:
In the code-behind, I have dynamically built a series of tablecells each with a Literal control containing an image.
----------------------------------------------------------------------------
dim litCont as New System.Web.UI.WebControls.Literal()
dim strValue as string = "testString"
dim contStr as string = "<img name='pix1' onMouseDown='doMouseDown("& strValue &")' src='images/pix1.jpg' />"
litCont.text = contStr
objCell.Controls.Add(litCont)
----------------------------------------------------------------------------
When the user clicks on any of the images it fires the JavaScript function doMouseDown() which receives a string parameter.
QUESTION: How could I then pass the value of the str parameter to the Label Control ("legend") in "Form1" so that the label may be updated?
I have simplified the structure of the form
----------------------------------------------------------------------------
<html>
<head>
<script language="javaScript">
<!--
function doMouseDown(str){
// code stuff here
}
-->
</script>
</head>
<body >
<form id="form1" runat="server">
<asp:table id="mainTable" runat="server" >
<asp:tableRow runat="server">
<asp:tableCell runat="server">
<asp:label id="legend" runat="server" />
</asp:tableCell>
</asp:tableRow>
</asp:table>
</form>
</body>
</html>
------------------------------------------------------------------------
Thank you
|
|
|
|
|
Your question would be better handled in the ASP.NET Forum[^]. Your question has nothing to do with VB.NET. The solution would be based entirely in JavaScript and the HTML that's generated by the asp tagged controls (Hint, Hint!)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok, I'll seek enlightment in other spheres.
pyb
A true guru not only knows, he can teach too.
|
|
|
|
|
document.GetElementByID("yourlabelname").value = str
hope this helps.
DADA
|
|
|
|
|
Hello Dada,
Thanks for your help.
<i>document.getElementById('legend').innerHTML = str;</i>
The line above is actually what works for me in this particular situation.
Anyway, thanks a lot for taking the time to help.
Cheers,
Pyb
|
|
|
|
|
I implemented a keyboard based tab system in my program. When you are in a control if you press "Enter" then the next control is focused as if you have pressed tab key. What the problem is that when you are in a DateTimePicker or TextControl and press "Enter" a "Dong" sound is heard which is like an error indicatior. How can I get rid of this sound?
|
|
|
|
|
|
Thanks for the link. It solves my problem and it is a comprehensive source solutions.
|
|
|
|
|
Hi
Short time before I had the same problem. This worked for me. The
e.Handled = True
disables the sound.
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
Me.SelectNextControl(Me.TextBox1, True, True, False, True)
End If
e.Handled = True
End Sub
CU
Dave
|
|
|
|
|
In VB 6, one can easily add in the API Viewer and then load up WIn32 API functions and constants in the viewer, so that it can be easily copy and pasted into our applications.In VB.Net, where can I find the APIs and its constants, so that I can cut and paste into my application.
|
|
|
|
|
www.allapi.net try there, there pretty good, examples and everything
"If i was king cigarettes would be free."
|
|
|
|
|
Purple Monk,
That site really helps.
You've given me a green light not purple.
Thanks.
|
|
|
|
|
In VB 6, one can easily add in the API Viewer and then load up WIn32 API functions and constants in the viewer, so that it can be easily copy and pasted into our applications.
In VB.Net, where can I find the APIs and its constants, so that I can cut and paste into my application.
|
|
|
|
|
There is no such app that and database that comes with VB.NET. Your best best for something like this is http://www.pinvoke.net[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Another guy point me to this www.allapi.net
It solved me problem.
|
|
|
|
|
can anyone pls tell me how to watch a video clip in VB.net once a button is clicked...
thx
|
|
|
|
|
With DirectX9. Be careful though, it's one big pathetic joke, read my article on all the bugs in it before using it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Ok I've created a class that adds buttons, textboxes, checkboxes etc at runtime. I can move all these objects etc. What I would like to do is make the program smart. Basically what I want to is beable to add many buttons, textboxes etc (already working) and link them up ie.
if I click on button1 it writes to a textbox that I specify, which is on the child form
if I click on button2 it opens up a file dialog
if I click on button3 it creates a new Database
if I click on button4 it opens up another form.
also if I want to change these configurations for the buttons I can do so with in the program. Basically you control what you want to do like in vb.net
|
|
|
|
|
I dunno for what reason you want to do so, but here is one way!
first make a string array with dimention of the total commands:
ReDim Action(iButtonsCount)
for each time creating a new button.
then set the array value to some command to be done, e.g.
Action(iButtonsCount)="OpenFileDialog"
then in click button event add:
<br />
Private Sub arrButton_Click(Index as Integer)<br />
Select Case Action(Index)<br />
Case "OpenFileDialog"<br />
'.....<br />
End Select<br />
End Sub<br />
Also if some of your commands need some parameters, you can make the array 2D or more, and set the parameter in the second column in the array.
I hope this will help.
|
|
|
|
|
I am writing a simple VB .Net application that will open a form, establish a socket connection with a server and then display the received data in the forms DataGrid.
Upon startup of the application the form opens. In the Form1.vb form_load procedure I call the ClientSocket class to establish the connection to the server. This is successful. Then I send my login informaiton, again successfully. Then I start receiving data, once again I am successful. I can then pass the received data from a private sub ReceiveCallBacks in the ClientSocket Class to a new Class to parse the data and display it using msgBoxes. But what I really want to do is get the received data back to the form.
Can some one help guide me...If more information about the code is required please let me know and I will post it.
THANKS -
Jennifer
|
|
|
|
|
VB6 says the following expression is too complex
to be computed (provided by a genetic program):
(0.187385 +(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(-0.647353+(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(-5.2078)) +(0.0531293 +
oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3)) +oOPT*(+oOPT*(+0.000904296*oDP3)
+oDP3*(-0.0286061+0.00372593*oDP3)))*(-5.25864+(0.0531293 +oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3))
+oOPT*(+oOPT*(+0.000904296*oDP3) +
oDP3*(-0.0286061+0.00372593*oDP3)))*(37.8453+-71.5963*(0.0531293 +
oDP3*(0.260794+oDP3*(-0.0914714+0.00960239*oDP3)) +oOPT*(+oOPT*(+0.000904296*oDP3) +
oDP3*(-0.0286061+0.00372593*oDP3)))+-136.292*(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +oN1*(-0.361811+-0.34512*oN1)))) +
(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +
oN1*(-0.361811+-0.34512*oN1)))*(34.1411+55.7764*(0.149214 +oN1*(2.0092+oN1*(5.22783+1.9466*oN1)) +
oReu*(-0.0449582+oReu*(0.00420568+-0.000105206*oReu+0.0137505*oN1) +oN1*(-0.361811+-0.34512*oN1))))))
It contains several common bracketed sub expressions that could be simplified.
Is there any code to simplify this expression and compute it ?
Any suggestions?
aprx
|
|
|
|