
Mayfield2268
Avatar/Signature-
Posts
30 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Mayfield2268
-
I'm using the following SQL in a aspx page with vb.net SELECT LNAPPLSA_TB.INTVW_NR AS EMPLOYEE, LOANAPPL_TB.APPL_DT FROM LNAPPLSA_TB, LOANAPPL_TB WHERE LNAPPLSA_TB.LOAN_APPL_NR = LOANAPPL_TB.LOAN_APPL_NR AND LOANAPPL_TB.APPL_DT > '30-DEC-03' A dataset is generated and binded to a datagrid. When I run the page, all data is returned. All records before '30-DEC-03' and after are displayed in the datagrid even though only records after '30-DEC-03' should be shown. When I use Oracle SQL*Plus it works fine. Does anyone know why this might be happening.
-
I have a Microsoft Access table that has a bunch of linked tables to a password protected Oracle table through ODBC. Is there a way to connect in a vb.net web application to this Microsoft Access table. I don't have problems connecting to the Access database, but it seems like when the access database tries to connect to the Oracle database, I get the following error... ODBC--connection to 'xxx' failed. Thanks
-
I have a win2003 web server that has the .net framework on it. I connect to web projects on this web server through visual studio.net which is installed on a remote client, but I don't have visual studio .net installed on the actual web server. Is there any thing that I need to install on the web server to run crystal? I get this invalid keycode error. According to documentation, you need to grant the ASPNET account read permissions on a couple of registries. Neither of these two registries are located on the web server.
-
I placed a drop down list in a datagrid. I want to pre-select which value in the drop down list is selected based an a value from a database. I keep getting the following error... Exception Details: System.NullReferenceException: Object variable or With block variable not set. Here is my code... Private Sub dgTest_Edit(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs) Handles dgTest.EditCommand Dim T As New DropDownList() T = CType(e.Item.FindControl("ddlTest"), DropDownList) Response.Write(T.SelectedIndex & "HELP") End Sub It seems to me that no control is found when I call FindControl resulting in the NullReferenceException. Does anyone know why this would be occuring? Thanks Jason Lee Mayfield
-
I don't think that the Response.Redirect works in the Session_End event in Global.asax.
-
Is there a way to redirect to a different page in the Session_End procedure of global.asax? Thanks
-
Hello If I have the text of a textbox binded to a Session variable, is there a way that I can bind any changes back to the session variable on a page unload or some other event without using the following code for each textbox on my page. Session("text") = txtBox1.text Thanks
-
Thanks again, that worked awesome. Hours of frustration finally came to an end. Thanks
-
Thanks for the response I was able to compile the .vb file into a dll file. But of course I'm not sure what to do next. I try adding the dll to the classes tab in Web Matrix but that didn't seem to work. Any suggestions Thanks
-
I have created a class in Web Matrix and I'm trying to call it from a .aspx page. Here is the code for the class... Imports System Namespace sqlClass Public Class sql Public Sub New() End Sub End Class End Namespace I get the following error when I try to declare an instance of this class in my .aspx page ... Compiler Error Message: BC30002: Type 'sql' is not defined. Source Error: Line 6: Line 7: Sub Button1_Click(sender As Object, e As EventArgs) Line 8: Dim sqlVB as New sql() Line 9: Line 10: End Sub I have also tried adding a import namespace as well as removing the Namespace code from the class. Does anyone have any suggestions as to why this error is occurring. Thanks
-
Thanks I'm actually using asp.net Web Matrix. I have created a folder and the .aspx page and the .vb page are in this folder yet I still get this error. Any other thoughts Thanks
-
I get the same error Compiler Error Message: BC30002: Type 'EmployeeInfo.EmployeeInfo' is not defined. Source Error: Line 13: Page.DataBind() Line 14: End If Line 15: Dim Emp as new EmployeeInfo.EmployeeInfo() Line 16: End Sub Line 17: I removed the import statement. Here is the class if this helps... Imports System Namespace EmployeeInfo Public Class EmployeeInfo Public Sub New() End Sub End Class End Namespace Thanks
-
I have created a class called EmployeeInfo with a namespace of EmployeeInfo. When I try to create an instance of this class in my .aspx page, I get the following error... BC30002: Type 'EmployeeInfo' is not defined. Source Error: Line 13: Page.DataBind() Line 14: End If Line 15: Dim Emp as new EmployeeInfo() Line 16: End Sub I have added this line at the top... <%@ import Namespace="EmployeeInfo" %> Does anyone have suggestions on how to create an instance of a class. Thanks PS I'm using Asp.Net Web Matrix Jason Lee Mayfield
-
Hello I'm trying to run a update statment to a MS Access database. I get the following error 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: No value given for one or more required parameters. Source Error: Line 129: Line 130: Line 131: cmd.ExecuteNonQuery() Line 132: 'dgNewAccount.ShowFooter = True Line 133: 'dgNewAccount.EditItemIndex = -1 Does anyone have an idea as to why this error is occuring. Thanks This is the implemented code: Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\Inetpub\wwwroot\Database\NewClosedAccount.mdb" Dim Conn As System.Data.OleDB.OleDbConnection = New System.Data.OleDb.OleDbConnection(strConn) Conn.Open() Dim MemberName As TextBox = e.Item.FindControl("txtMemberName") Dim AccountNumber As TextBox = e.Item.FindControl("txtAccountNumber") Dim Suffix1 As TextBox = e.Item.FindControl("txtSuffix1") Dim Suffix2 As TextBox = e.Item.FindControl("txtSuffix2") Dim ReferredBy As TextBox = e.Item.FindControl("txtReferredBy") Dim OpenedBy As DropDownList = CType(e.Item.FindControl("ddlOpenedBy"), DropDownList) Dim tDate As TextBox = e.Item.FindControl("txtDate") Dim ID As Label = e.Item.FindControl("lblID") Dim sql As String sql = "UPDATE NewAccount SET MemberName = @MemberName, AccountNumber = @AccountNumber, " sql = sql & "Suffix1 = @Suffix1, Suffix2 = @Suffix2, ReferredBy = @ReferredBy, OpenedBy = @OpenedBy, " sql = sql & "DateOpened = @Date WHERE ID = @ID" Dim cmd As New System.Data.OleDb.OleDbCommand() cmd.CommandText = sql cmd.Connection = conn cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@MemberName", MemberName.Text)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@AccountNumber", CInt(AccountNumber.Text))) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Suffix1", Suffix1.Text)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Suffix2", Suffix2.Text)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@RefferedBy", ReferredBy.Text)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@OpenedBy", OpenedBy.SelectedItem.Value)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Date", tDate.Text)) cmd.Parameters.Add(New System.Data.OleDb.OleDbParameter("@ID", ID.Text)) cmd.ExecuteNonQuery() Conn.Close()
-
I have this sql insert statement below. I use a select statement to grab the values. The only problem is that I want to use @New_ID as a value to insert. Where it says SELECT New_ID, can I replace it with SELECT @New_ID? Thanks CREATE PROCEDURE dbo.DeletePersonMerge @New_ID varchar (100), @Deleted_New_ID varchar (100) AS INSERT INTO tblPersonInterests (New_ID, IC_ID, Mod_Date, Last_Changer) SELECT New_ID, IC_ID, Mod_Date, Last_Changer FROM tblPersonInterests WHERE New_ID = @Deleted_New_ID AND IC_ID NOT IN (SELECT ic_id FROM tblPersonInterests WHERE New_ID = @New_ID)
-
Hello I have a radio button list that has the potential of having the same text for multiple Items. For Example: I have a radio button list that might have the name John listed two or more times. When a button is clicked and I select one of the Johns, the selected item of the radio button list is always the first John in the list. Does anyone know a way so that the selected item is actually the item that was selected. Thanks
-
Hello I'm using Asp Web Matrix to develop. I have created a simple page with a button. I run this page using the Web Matrix web server and everything works fine. I see the button on the page. When I run it using IIS, the page loads but at the bottom it says 'Done, but with errors' and the button is never displayed. Does anyone having any suggestions on how to get the page to run using IIS. Thanks
-
Here is a procedure that might help depending on what your actually doing. This procedure allows you to set a default button for different controls such as a textbox. Public Sub DefaultButton(ByRef Page As System.Web.UI.Page, ByRef objTextControl As TextBox, ByRef objDefaultButton As Button) ' Sets default buttons. ' Created by Janus Kamp Hansen - http://www.kamp-hansen.dk Dim sScript As New System.Text.StringBuilder() sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf) sScript.Append("function fnTrapKD(btn){" & vbCrLf) sScript.Append(" if (document.all){" & vbCrLf) sScript.Append(" if (event.keyCode == 13)" & vbCrLf) sScript.Append(" { " & vbCrLf) sScript.Append(" event.returnValue=false;" & vbCrLf) sScript.Append(" event.cancel = true;" & vbCrLf) sScript.Append(" btn.click();" & vbCrLf) sScript.Append(" } " & vbCrLf) sScript.Append(" } " & vbCrLf) sScript.Append("}" & vbCrLf) sScript.Append("</SCRIPT>" & vbCrLf) objTextControl.Attributes.Add("onkeydown", "fnTrapKD(document.all." & objDefaultButton.ClientID & ")") Page.RegisterStartupScript("ForceDefaultToScript", sScript.ToString) End Sub Hope this helps
-
Is there a way to allow a user to enter text into a drop down list? I have a list of programs, but I also want to allow the user to enter a program that is not in the list. Any thoughts. Thanks
-
Is there a way to make a required field validator work only if a specific button is clicked. I have two command buttons. One is search and the other is add new person. If the user selects search, I want to validate the user has entered text, but if the user selects add new person, I want the required field validator to be ignored. Any thoughts? Thanks
-
I have a group of tabs at the top of my web page. When the user clicks one of the tabs ('Cancel and Exit'), I want a dialog box asking them if they are sure they want to exit. If they reply 'Yes' I want to redirect to the appropriate page and if they reply 'Cancel', I want to keep them on the current page. Does anyone know of a way this can be done in asp.net using vb.net, javascript, vbscript etc. Thanks
-
Hello I have a datagrid and a listbox on my web page. I want the listbox to be placed directly below the datagrid. The datagrid will always vary in height, depending on the number of records returned from a database call. If too many records are returned the datagrid and listbox overlap. Is there anyway to prevent them from overlapping. Thanks
-
I have placed a checkbox in each row of my datagrid. When I check say 2 of the 3 checkboxes and then hit a submit button that does a postback, the checkboxes remain checked but the .checked value of the checkboxes is false. Dim i As Integer For i = 0 To dg.Items.Count - 1 Dim cb As New CheckBox() cb = dg.Items(i).Cells(2).Controls(0) Response.Write = cb.Checked Next If I have three rows this writes out False three times even though 2 of the 3 checkboxes are checked. Any thoughts? Thanks
-
Hello I have created a class called Utilities.vb in my ASP.Net web application. Is there a way that I can use Session Variables within this class? Is there some import System.... statement that I can insert? Thanks Jason Lee Mayfield
-
I'm trying to use custom validation to verify that user input matchs a value in a database. I have no problem getting it to work with the use of a submit button. I'm wondering if there is a way to get it to work with a control. I have a tab view control and when I click on a different tab I want to be able to validate before it gets redirected to the new page. Is there a way I can post the form to the server without the use of a submit button? Thanks Jason Lee Mayfield