Hello, I currently have a form and within this form there is a listbox control that is displaying data from a table. The fields within this table are records in other tables in the database. I want the user to be able to double click a record in the listbox and a for will open and it will have a drop down for each column in the record and the user will be able to change the value for that column via drop down boxes that have all possible values for that field. When they are done I want to take all their new selections for the fields of this record and save it back to the table. Can anyone give me any ideas or pointers. Thanks in advance! Frank Lepkowski cout << "Hello World!" << endl;
frank21
Posts
-
Editing/Saving a record selected in a Listbox -
submitting a formYou should be able to do this by setting up a click event handler for this item in your form. Try double clicking within your list control while the form is in design view, a new event handler should be generate in which you can enter your code. Hope this Helps! Frank
-
Accessing Remote Files Via VBA code in Access DBHello All, I wrote the code below planning to use it to pick out the newest database log file in a certian directory on a computer on our LAN.
Function NewestFile(Directory, FileSpec) ' Returns the name of the most recent file in a Directory ' That matches the FileSpec (e.g., "*.xls"). ' Returns an empty string if the directory does not exist or ' it contains no matching files Dim FileName As String Dim MostRecentFile As String Dim MostRecentDate As Date If Right(Directory, 1) <> "\" Then Directory = Directory & "\" FileName = Dir(Directory & FileSpec, 0) If FileName <> "" Then MostRecentFile = FileName MostRecentDate = FileDateTime(Directory & FileName) Do While FileName <> "" If FileDateTime(Directory & FileName) > MostRecentDate Then MostRecentFile = FileName MostRecentDate = FileDateTime(Directory & FileName) End If FileName = Dir Loop End If NewestFile = MostRecentFile End Function
However, the directory that I need to pass to this function when called is a filepath on a computer on the LAN and the directory I need to access is password protected. Can anyone help me out on how to do authentication using VBA code in an access DB. Thanks is advance. Frank -
Access RunApp commandHello, I am creating a database with access and I have a question involving a macro I have created. In the Begging line of the macro immediately following the Warnings on field in design view, I have a RunApp Command that executes a batch file which takes about three minutes to complete. The problem is, the rest of the queries being used in this macro depend on the new data brought in by the batch file. Can anyone suggest a way to get around this so taht the batch file can execute before I continue executing the rest of the macro? Thanks in advance for any help!
-
Access RunApp QuestionHello, I am creating a database with access and I have a question involving a macro I have created. In the Begging line of the macro immediately following the Warnings on field in design view, I have a RunApp Command that executes a batch file which takes about three minutes to complete. The problem is, the rest of the queries being used in this macro depend on the new data brought in by the batch file. Can anyone suggest a way to get around this so taht the batch file can execute before I continue executing the rest of the macro? Thanks in advance for any help! Frank Lepkowski
-
Double Click Event for ListBoxI have a ListBox control within my aspx webform. I am trying to create a double click event handler for it. From what I have seen, this is only supported in windows forms, anyone ever donw this from an asp.net application. Thanks in advance for any help. Frank
-
Impersonation vs. delegationI have an asp.net application that is using integrated and basic authentication. My application runs on a remote server on the lan and accesses a database on a share elsewhere on the lan. I am having trouble with allowing my asp.net application to get access to teh database. I have impersonation set to true in my web.config file. I am wondering if I need to use delegation to pass the credentials of the user of the asp.net app to the database or will this work with impersonation and I am doing something incorrectly. Thanks in advance Frank
-
ASP.NET Resource AuthenticationHello, I am writing an ASP.net application that reads data from an access database and displays it with crystal reports. I am having problems with the application getting access to my database due to security settings. The problem is I am not sure where I need to change security settings-the database file directory?-IIS?-ASP web.config file? Here are the current settings I have in each of the above. 1. The database is up on a share over the LAN and is set to give read access to anyone logged into a certain domain, this is read only access by the way 2.The IIS website directory is set up for both domain authentication and windows integrated security. 3. In the authentication section of my web.config file it is set to windows. I am not sure where I need to make changes so that the application will be able to access this database when users pass authentication. Thanks in advance for any help. :omg: Frank
-
Problem using table aliases in ADO.net datasetHello, I have an access db that uses a recursive structure to store data i.e. there is a parts table (but there are three levels in the structure feature bill, level1 package, and then parts but they are all considered a part in the database I am extracting the nesting ability from an attribute in the parts table called style. Depending on the value of style i.e. style = 0 its a part, style = 1 it is level1package and style = 2 it is a feature bill) I am trying to generate a report that will show me for every feature bill, what level1 packages are in it and what parts are in each one of those packages. So I am essentially showing all the hierarchical levels of nesting. I am attempting to do this buy using a dataset that has multiple instances of my packages table(packages table is essentially the child element of the parts table) and linking the child node to the parent node each time until I reach the maximum amount of nesting I want. Can anyone help me out with setting up the dataset correctly? I am running into the following error: :System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. at System.Data.DataSet.FailedEnableConstraints() at System.Data.DataSet.EnableConstraints() at System.Data.DataSet.set_EnforceConstraints(Boolean value) at System.Data.DataTable.EndLoadData() at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) I am not sure how to fix the problem and any help would be greatly appreciated, thanks in advance! Frank
-
Hardcoded filepaths c#Hi all, I am experiencing a problem and I am not sure how to go about fixing it. I have an ASP.net app that is reading from a database. I have a default database file path hardcoded into my program that the program will use if the user does not specify a database file. When executed, if the program tries to access the default database it is failing. It seems like .net is adding a "C:" to my file path where it should be "\\dir1\\dir2\\DB.mdb" Can anyone help me out so that I can access the default database on the LAN. Thanks again :-D
-
About AMD 64I recently purchased an AMD 64 processor, I am wondering what motherboard would be a good choice for the processor and a kick ass video and sound card. Thanks in advance cout << "Have a great day" << endl;
-
XSD Dataset and Oracle query with functionsI recently experienced the same problem, and I fixed it by setting up relationships between the table in your schema.xsd file. Seems like your relationships in the schema file need to match those in the database itself to resolve issues like this. Hope this helps Frank cout << "Have a nice day" << endl;
-
Question involving SQL/Queries/Crystal ReportsHi All, I am reporting with Crystal Reports for .net off of a live access database up on a web server. The database design sort of replicates a parts inventory and the way it was designed almost replicates recursion. For example there is a parts table and each row in the table has a part number, details, and a style number. The style number tells us whether it is a level 1 part, level 2 part, or a level 3 part. This database design supports an infinite number of nesting of parts within other parts using another table linked to the parts tables called packages with two links to the parts table. I am using ADO.Net datasets to report off of I am looking for a way to report on for instance all the level 1 or level 2 parts in a level 3 part or any combination like that. Has anyone ever created a crystal report that recursively looked up records in a database. Thanks in advance my head is going to explode soon I think :mad: Frank SHIKAKA
-
Security Question IISI have an ASP.net application that runs behind a firewall on a LAN so I am planning on using basic authentication w/out Secure Sockets Layer due to little or no worry of attackers. I am experiencing something and I am not sure whether the problems lies in the differences between OS version, IIS version or something else. This is the problem I am having: I currently have my development machine setup as a web server running IIS 5.1, I currently deployed my ASP.Net application onto an Windows 2000 Advanced Server and it runs fine on the server but I am experiencing differences in the basic authentication off the IIS snap ins between the two machines. Whenever you open internet explorer and invoke any page in my website on my local machine it pops up a window and asks you to enter signon and login, I set up permissions exactly the same on my local machine and the server and when you invoke the web page being hosted by the server instead of a window popping up for user to enter thier pword and login it automatically redirects the browser to a page that says "You are not authorized to view this page". As far as I know the settings on my local machine's IIS and the servers IIS are the same, any ideas why they arent behaving the same? Thanks in advance I have been banging my head on the wall all day. :wtf: Frank
-
Accessing objectsEach form you create in .net is in itself a class so if you instantiate an object of one form within the code behind for the other form you will be able to access it's components ie: Within the Form2 code write Form1 myForm1 = new Form1(); Then also within the Form2 code write textboxname.DataSource = myForm1.Text.ToString(); and it should put the data in the approppriate place Please not what I have written is very basic there is a large amount of help for questions like yours in places like this website and msdn so don't be shy dig right in an get an early understanding of OOP with .net
-
CR 9 for C#.net QuestionHello All, I have an ASP.net application that is currently using the push method and displaying reports off of ADO.net datasets. I am struggling with a design method for the following questions: 1. .NET treats each crystal report you add to your project as a class and I am using a several reports and the ReportDocument class to set datasources for each one and so on. Depending on which report my users select in an aspx page i show them the report they want by creating an object of the type of report they selected. I am wondering if I can create say Object myobj = new Object() and depending on what report they select cast the general myobj object into the specific type of the report class the user selected instead of having to instantiate an instance of every type of report within my code? Thanks for your help:confused: Frank
-
Help with CR 9 for C#.NETMy reports have been reporting off of ADO.NET datasets the whole time, this will be perfect I can just sort the dataset before i set the report source! Thanks Heath
-
Help with CR 9 for C#.NETI am currently developing an asp.net application that develops crystal reports using the push method. What I am wondering is if I can allow the user to specify sort options during runtime while they are viewing the report information in the .asxp page? For instance I have a report that displays three bits of information about a part(PartNumber,RevisionNumber,CallNumber). I am wondering if I can allow the user to switch between sorting the records by these given fields and just have the page reload with the same data in the newly selected sorted order. Thanks in advance for any help ;P Frank Lepkowski PS Sorry if this is not posted where it should be I was not sure were to stick the post! Live today like it's the last day of your life..........
-
Crystal Reports with C# QuestionI am currently developing an asp.net application that develops crystal reports using the push method. What I am wondering is if I can allow the user to specify sort options during runtime while they are viewing the report information in the .asxp page? For instance I have a report that displays three bits of information about a part(PartNumber,RevisionNumber,CallNumber). I am wondering if I can allow the user to switch between sorting the records by these given fields and just have the page reload with the same data in the newly selected sorted order. Thanks in advance for any help Frank Lepkowski :confused: PS Sorry if this is not posted where it should be I was not sure were to stick the post!
-
Power about Uninteruptable Power Supply eventsI need a way to be able to detect when ac power to my computer is not available. My cpu is on an UPS and system power management does not catch this event if i unplug the UPS and my system runs on battery. I read the documentation for the system power management class and it will detect an ac to battery power event for a system (internal battery) battery. Does anyone know of a way i can detect when power is coming from a battery in the UPS? Thanks in advance!