- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
35 Posted Topics
An easy approach would be to separate the values in the array by a comma before putting it into the database as a comma delimited string. Then when you bring it back from the database, just do a split on the comma. I'm sure there's better/more elegant solutions, but that …
The simplest way would be to create a new .aspx page in your project and copy the HTML into the markup of the .aspx page. Simply renaming the HTML file to aspx wouldn't work because the .aspx file is really like 3 files in one. You have your .aspx, .aspx.[language], …
I don't think variables in XSL are mutable.
It would probably be possible, but I would probably rethink why there are database calls inside of the constructor. I would rather split it out into a separate call. Here's a link to a Microsoft Patterns and Practices article. If it can't answer questions about how to handle database connectivity …
This should work: [code=VB.NET] label24.Text = String.Format("{0:F2}", a/b) [/code]
In your code behind, you would bind a DataSet or some other object to a control on your form. In your markup, the statement you gave then uses whatever object you bound to your control to look up the value with a key of Prod_Id. So, if you bound a …
If what you're trying to do is put the results of the SELECT statements in a and b into the parameters, then it's not going to work like you think it will. Your best bet is to use a stored procedure. That way you'll be able to use variables in …
Have you tried taking renamed "Colour Name" to something like "ColourName"? It might not like the space.
Rather than adding the Temp node from the dataset as a child of the Temp node from doc, you could loop through the children of myNode and add them as children of TempNode. [code="C#"] string xml = "<?xml version=\"1.0\"?><MyTest XMLVersion=\"1.3\" Stamp=\"" + DateTime.Now.ToString() + "\"><Test></Test><OtherNode></OtherNode></MyTest>"; doc.LoadXml(xml);//start the xml GetTestData(); //gets …
To answer you questions about the different source files, if you're using Visual Studio, each time you add a new component to your solution (as explained by ddanbe above), it is placed in its own physical code file in your solution's directory. So if you had 10 forms, you would …
If you've ever expanded the file for a form in the list view in your solution explorer pane, you should see two files below the main Form source file. There should be a [form_name].Designer.cs (or whatever language). Inside that file is where it handles setting all of the properties for …
Do you mean you need to start an application from your ASP web application? Are you trying to get it to start on the client's machine? Wouldn't it just start on the server?
If this is the problem I think it is, I usually fix it by using the Text property of the combo box. It should allow you to get the text of what's in the combo box without the user actually having to select it.
Is whether or not the checkbox is checked tied to a field in the database?
Get rid of the surrounding ' for the values in your insert statement. [code]INSERT INTO DataStatus(CedantID, CompanyType, CompanyName, TypeOfFile, FileName,Reportingperiod) VALUES ('@CedantID', '@CompanyType', '@CompanyName', '@TypeOfFile', '@FullFileName','@ReportingPeriod')[/code] should probably be [code]INSERT INTO DataStatus(CedantID, CompanyType, CompanyName, TypeOfFile, FileName,Reportingperiod) VALUES (@CedantID, @CompanyType, @CompanyName, @TypeOfFile, @FullFileName,@ReportingPeriod)[/code] With Access, I've also had to do something …
You would probably have to play with the count and where the message box is displayed to get this to be exactly what you want, but I think something like this should work. [code=vb] Public Class Form1 Dim numTries As Short Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As …
You could always just use the built in login controls assuming you're using at least .NET 2.0 [url]http://msdn.microsoft.com/en-us/library/ms178329.aspx[/url]
If I'm reading this correctly, it sounds like you just want to be able to manipulate the ListView on a Form from another class somewhere in your application. Have you tried making a public instance method in your form class that takes whatever value you want to add to the …
Have you tried just reading in the lines and splitting based on the "." and "{"? [code=VB] Dim streamRead as StreamReader = new StreamReader("xyz.css") Dim input As String = streamRead.ReadLine() Dim splitParams as String() = {".", "{"} Dim cssClass as String If input.StartsWith(".") Then cssClass = input.Split(splitParams, StringSplitOptions.RemoveEmptyEntries)(0).Trim() Else cssClass …
You could try to use a case statement in the where clause to determine which value to match. You could pass two parameters to the stored procedure. One of the parameters could be used to determine which field from the database to use in the where clause (this is also …
You could use a Dictionary to create a set of key-value pairs. You could use the name of the food as a string key and the votes as an int value. [URL="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"]http://msdn.microsoft.com/en-us/library/xfhwa508.aspx[/URL]
You might want to take a look at jQuery. It makes it really easy to manipulate objects on your page.
If all you have to do is validate each line of text, the System.IO.StreamReader class would be my choice. Just read in each line and do any validation you need to do. Splitting each line by the '' could make things easier depending on what kind of validation you need …
I think there's a couple of ways you could solve the problem you are having. One of the options you could use would be to make MotorVehicleAdministration a separate object. [code=C#] using System; namespace Returning_a_Class_From_a_Method { public class MVADate { private int dayOfBirth; private int monthOfBirth; private int yearOfBirth; public …
How is your application set up? Is Admin_Calculator the name of the Form or is it an instance of the form you have created? Do you create an instance of the form to show with the .Show() method?
My only question would have to be why do you need to? You need to think about the fact that ASP runs on the server while JavaScript is on the client.
The last sentence in your description would lead me to believe it's a separate entity only because a table for Stock would allow a query to be run against that table to get a list of things that might need to be reordered.
I actually just started to pick Python back up a couple of days ago. What has probably helped me most is going through the problems at [URL="http://www.projecteuler.net/"]Project Euler[/URL]. It's a great way to not only learn the syntax of the language but also some of the things that make it …
I'm assuming you want to check the values before making the call to the FV function. If that's the case, you could accomplish what you're trying to do with three simple if statements. Something like the following would probably work just fine: [code=vb] Private Sub compute_Click(ByVal sender As System.Object, ByVal …
Do some research on normalization. You might want to consider a simple setup where you have three tables. [U]Menu[/U] MenuID (Primary Key) MenuOutlet [U]Starter[/U] StarterID (Primary Key) StarterDescription [U]MenuStarter[/U] MenuID (Primary Key - 1) StarterID (Primary Key - 2) This setup allows you to have as many starters as you …
What version of .NET are you using? If you have the System.Data.SqlClient (or even System.Data.OleDb) library available, it's actually really easy to do what you're trying to do. I can put up some sample code if you can get to that library.
Assuming both PC's will be Windows, you could always just try putting the database on a different computer inside of a shared folder like and using \\IP_address\shared_folder\database as the location instead of the standard C:\... inside of your connection string. A test to see if this will work would be …
Just from quickly looking at your connection string, I saw that you used " marks in your string. You don't actually need these. If you go to [url]http://www.connectionstrings.com[/url], you can get connection strings for various DB platforms. The one they suggest for Access is Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=; If you're not …
I've always used the following method for database operations. I split the actual database access into two methods: ExecuteQuery and ExecuteNonQuery. In your case, if you're trying to write to the database, you would want to execute a non-query. [code=C#] private static void ExecuteNonQuery(OleDbCommand cmd) { OleDbConnection dbConnection = new …
I've always run into issues with using the IDENTITY property in Access. If your using an autonumber, you could always just do something like: SELECT MAX(autonumber_column_name) AS alias FROM table_name Do that after your insert and it should return the last autonumber generated.
The End.
bcasp