
stewarts
Members-
Posts
22 -
Joined
-
Last visited
stewarts's Achievements
Newbie (1/14)
0
Reputation
-
Thanks for your reply, Gill Bates. Since I already have so many of these conditions in my code, I thought it would be quicker at this point to just figure out what's wrong with the alert message. It seems the exc.message contains something which cannot be displayed, thus causing the entire alert display to fail. When I removed the exc.message portion of the message to be displayed, it worked fine. What I ended up doing is parsing the exc.message up to the first period and then displaying just that part of the exc.message...and that worked okay. Thanks again!
-
Hi, I have created an alert message that displays as a pop-up window that is supposed to display whenever an error is encountered - I call it in the catch block of my try-catch. (Previously I was using a label on the page and setting it's text value to the error message and changing it's visible property from true to false whenever an error was encountered.) I changed to this much cleaner, better looking option. My problem is that, when I call it, it displays sometimes and sometimes it doesn't...I don't know why. On the pages where it displays fine, it always works, but on other pages, under other unknown conditions, it never works. If anyone could shed some light, I would appreciate it VERY much. I've put this code in A LOT of pages of my web application, changing over from the label method...it worked in the page I first changed and tested so I made the mass changes...now it's not working in some instances. ??? Below is the code I'm using... Thanks in advance, Sue Try InsertSql = "Insert into AuthorizedCentralUsers (UserName,MaintOrgData,MaintAgncyData,MaintAccrdtrData,MaintItmDescData,DelAccrdLstRec,MaintUserData,MaintLaptopUserData,MaintSchoolCodeData,MaintComponentData,MaintProponentData,Reports,Password) values('" & UserName & "','" & MaintOrg & "','" & MaintAgncy & "','" & MaintAccrdtr & "','" & MaintDesc & "','" & DelASLRec & "','" & MaintCenUser & "','" & MaintLaptopUser & "','" & MaintSC & "','" & MaintComp & "','" & MaintProp & "','" & Rpts & "','" & HashedPassword & "')" MyInsertCmd = New SqlClient.SqlCommand(InsertSql, DBConn) DBConn.Open() MyInsertCmd.ExecuteNonQuery() 'ASPNET_MsgBox("User record added successfully.") ViewState("MainRecDone") = 1 Catch exc As Exception WriteError = True ASPNET_MsgBox("ERROR SAVING NEW RECORD >>> (" & exc.Message & ")") End Try Public Sub ASPNET_MsgBox(ByVal Message As String) System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf) System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf) System.Web.HttpContext.Current.Response.Write("</SCRIPT>") End Sub
-
Hi, I have an ASP .net page that contains a label and a NEXT button. I want to display in the label, array values one at a time as the next button is pushed. This is the foundation that I will build further functionality on. This seems so simple, but I can�t figure out how to do it � I am new to asp .net. I�m trying to increment a counter to go through the array, but the counter keeps getting reset to zero. I hope someone can help me. THANKS! Here is my code: Public Class AssignRecTypePerms Inherits System.Web.UI.Page Dim ctr As Integer Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim SCArray(,) = CType(Session.Item("SessSCArray"), Array) lblSchoolCode.Text = SCArray(1, 0) ctr = 0 End If End Sub Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click Dim SCArray(,) = CType(Session.Item("SessSCArray"), Array) ctr = ctr + 1 lblSchoolCode.Text = SCArray(1, ctr) End Sub End Class
-
Can anyone show me some code on how to copy records from one MS Access database and insert them into another MS Access database. I know how to fill a dataset with records from database1, but don't know how to insert those records into dataset2. Your assistance would be GREATLY appreciated. Thanks, Sue
-
Does anyone know if it's possible to pass the password for a password-secured MS Access db through the connect string or through code? I have a vb.net windows app that had a working crystal report that connected to the ms access db. I had to password-secure the database and now the crystal reports can't get to the database. I keep getting a login screen (which I do not want to appear), but even if I enter the password in the logon screen, the login fails every time. Thanks for any assistance.
-
Thank you for your replies. I have done what you suggested. I passed the information needed in Form-2 from Form-1 as parameters. It seems to be working so far. Thanks again. Sue
-
--I have an application� --The solution consists of 2 projects --Project 1 properties show output type = Windows Application --Project 2 properties show output type = Class Library --I am able to add a reference to Project-2 within Project-1 (I am showing a form in Project-2 from a form in Project-1) --I am not able to add a reference to Project-1 within Project-2 (Error Msg �A reference to Project-1 could not be added. An assembly must have a �dll� extension in order to be referenced.�) So how can I see public variables in a form in Project-1 from a form in Project-2? This is probably very basic, but I can�t figure it out. Thanks for any help!!!!! Sue
-
Hi...I hope someone can point me in the right direction here. I have a Windows application developed in Visual Studio .NET 2003. The app has reports that were developed in Crystal Reports. Last month everything was working just fine. Now, suddenly and inexplicably, all the references for Crystal Reports (CrystalDecisions.CrystalReports.Engine, CrystalDecisions.ReportSource, CrystalDecisiions.Shared, crystaldecisions.windows.forms) are broken (they have a yellow triange with an exclamation point on them in the solution explorer) and all the imports in the report.vb file have errors (namespace cannot be found). I tried removing one of the references so that I could re-add it, but there are no crystal report/decision options to choose on the .net tab of the Add Reference window. Also, if I try to add a new item, there is no Crystal Report item in the list of templates in the Add New Item window. It's as if all the Crystal Report stuff is gone. I think Crystal Reports is supposed to be imbedded in Visual Studio .NET 2003, so don't know if I need to install Crystal Reports software or what? I hope someone can help me out as I have wasted way too much time trying to figure out what went wrong. Thank you very much in advance!!! Sue
-
Found Solution I found a solution to this...If after setting the .text property, I set focus (RichtextBox1.Focus() ) before changing to another TabPage, the set value is retained. Don't know why, but it worked!!
-
I have a vb .net windows form with a tabcontol. On TabPage1 I have a RichTextBox. The TEXT property of the RichTextBox is bound to a database field. The user can change the text contents of the RichTextBox by typing in the field, cutting/pasting, etc. I then use an update routine to update the database. All that works like a champ. If I type in the RichTextBox field, then change to TabPage2, and back again to TabPage1, the changed value I typed is still there in the RichTextBox. However, if I change the value of the RichTextBox by setting the TEXT property thru the code, then change to TabPage2, and back again to TabPage1, the value reverts to the original database value (or the last value typed in the field). I have to be able to set the TEXT value thru code because there is a spell check function on the field. Can anyone please give me a clue what I need to do to keep the value from reverting? THANK YOU SO MUCH!!!!!
-
Got it!!! Thanks!!!
-
So....how do I reference the form?
-
I have a VB .NET Windows application (solution) that contains 2 projects. How can I display a form that is in Project2 from a form that is in Project1? I thought I could reference the project name (which would also be it's namespace name) but it keeps telling me the name is undefined. Running form1 in Project1...trying to show ReportForm that is in Project2. I tried: Dim newform as New ReportForm() Also tried: Dim newform as New Project2.ReportForm() I guess I'm missing a step somewhere??? Thanks!
-
Visibility of textbox.text value on tabcontrol
stewarts replied to stewarts's topic in Windows Forms
To ailzaj.....How do I use the line of code you suggested? I created a DataConnection, DataAdapter, and then generated a DataSet. The textbox is bound to the data through the DataBindings/Text property. I have many bindings of this sort in my form. When describing my problem, I simplified it in order to be able to describe the actual problem occurring. I can't just databind both boxes to the same datasource...it's not that simple. In trying to use the line of code you suggested, I don't know how to define the portion you refer to as tblCust. Thanks for everyone's input!!! -
Visibility of textbox.text value on tabcontrol
stewarts replied to stewarts's topic in Windows Forms
No...I have a DataAdapter and DataSet...I filled the DataSet through the DataAdapter. When I have data in DataSets like this I point to specific records with the --- Me.BindingContext(DataSetName, "TableName").Position = 0 --- statement. When I go to TabPage2 there is a value visible in the textbox; but I just can't see it when I'm on TabPage1 until I flip over to tab2 and back to tab1.