dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

assuming you have a textbox named tbCount

inside the tick event, or a method you call from it

Create a variable named count, on each tick call:

int count = 0;

void timer_Tick(object sender, ElapsedEventArgs e)
{
count++;
this.tbCount.Text = count.ToString();
}
dickersonka 104 Veteran Poster

Looks good.

Possibly try removing User Instance=True.


Did you check the permissions on the stored procedure, and can you post the stored procedure sql code when you click on the stored procedure and click script to?

dickersonka 104 Veteran Poster

I mean, ensure the user you are connecting has permissions to execute this stored procedure.

Right click the stored procedure and check properties -> permissions, add the user if they are not in the list.

Can you post what you are using for your connection string and the scripted stored procedure that sql generated?

dickersonka 104 Veteran Poster

Did you add the user to the stored procedure?

dickersonka 104 Veteran Poster

Ensure you have rights, and possible try prefixing with dbo.

And ensure you are specifying the correct database in the sqlconnection

dickersonka 104 Veteran Poster

I would suggest doing this, calling p_InsertVehicleWithCustomer from the code.

PROCEDURE dbo.AddNewVehicle
	-- Declare variables for inserts into 2 tables
	(
	@reg nvarchar(50),                -- 1
	@manufacturer nvarchar(50), -- 2
	@model nvarchar (50),          -- 3
	@genericName nvarchar(50), -- 4
	@fleetNo nvarchar(50),          -- 5
	@serialNo nvarchar(50),        -- 6
	@engineNo nvarchar(50),       -- 7
	@chassisNo nvarchar(50),      -- 8
	@vinNo nvarchar(50),            -- 9
	@year nvarchar(4),               -- 10
	@colour nvarchar(50),            -- 11
	@idvehicle	int OUTPUT
	)
	
AS
	
	-- Insert all data into the Vehicle table 
	INSERT INTO Vehicle(Registration, Manufacturer, Model, GenericName, FleetNo, SerialNo, EngineNo, ChassisNo, VIN_No, YearOfManufacture, Colour)
	VALUES (@reg, @manufacturer, @model, @genericName, @fleetNo, @serialNo, @engineNo, @chassisNo, @vinNo, @year, @colour)
	
	-- Retrieve the automatically generated ID value from the Vehicle table
	SET @idvehicle = @@IDENTITY
	
	
	RETURN



PROCEDURE dbo.p_InsertVehicleWithCustomer
	(
	@reg nvarchar(50),                -- 1
	@manufacturer nvarchar(50), -- 2
	@model nvarchar (50),          -- 3
	@genericName nvarchar(50), -- 4
	@fleetNo nvarchar(50),          -- 5
	@serialNo nvarchar(50),        -- 6
	@engineNo nvarchar(50),       -- 7
	@chassisNo nvarchar(50),      -- 8
	@vinNo nvarchar(50),            -- 9
	@year nvarchar(4),               -- 10
	@colour nvarchar(50),
	@idcompany int                  -- 12
	)

	DECLARE @idvehicle int
	EXEC AddNewVehicle(@reg, @manufacturer, @model, @genericName, @fleetNo, @serialNo, @engineNo, @chassisNo, @vinNo, @year, @colour, @idvehicle OUTPUT)

	INSERT INTO Customer_Vehicle(ID_Company, ID_Vehicle)
	VALUES(@idcompany, @idvehicle)
dickersonka 104 Veteran Poster

The code needs to call the stored procedure we have...I believe lol.

What happens when you do this?

myCommand = new SqlCommand("AddNewVehicle", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;

dickersonka 104 Veteran Poster

A tick is based upon the time interval.
For example you set the timer to poll every 1 second.

After 1 second elapsed,
tick
After 2 seconds,
tick

Is this what you are asking?

dickersonka 104 Veteran Poster

lol what?

I thought you already have the stored procedure in the database, and you are accepting the values through the code.

myCommand = new SqlCommand("CreateVehicle", myConnection);
            myCommand.CommandType = CommandType.StoredProcedure;

You mean the above code is not hitting the database?

dickersonka 104 Veteran Poster

I would suggest it is bad practice to use the image_id for sequence. Add an int column to use for sequence, update it if necessary.
You shouldn't need to update it, if you use order by with sequence column, this would be a much cleaner way, than updating an id column.

dickersonka 104 Veteran Poster

I'm not understanding that if you already have the company_id, why you don't want to pass it in.

You are inserting the new vehicle, and have a company id already.

I would suggest creating two stored procedures. Maintain this one that inserts a vehicle only and another stored procedure that calls to insert the vehicle, gets the id, and makes the call to insert customer vehicle.

dickersonka 104 Veteran Poster

What is the create vehicle stored proc?

dickersonka 104 Veteran Poster

You are still adding the companyid parameter.
Take that out and you should be good to go.

myCommand.Parameters.Add(new SqlParameter("@idcompany",i_companyID));//, SqlDbType.Int, 4, "ID_Company"));
dickersonka 104 Veteran Poster

select * from employees
group by employee_id
having count(employee_id) >= 2

dickersonka 104 Veteran Poster

Easiest to just make it an aspx page and add the javascript to that. If you just need javascript here's a couple links on parsing the query string through javascript.

http://triaslama.wordpress.com/2008/04/12/retrieving-query-string-values-in-aspnet-and-javascript/

http://support.internetconnection.net/CODE_LIBRARY/javascript_Parsing_Query_String.shtml

dickersonka 104 Veteran Poster

on the longtext fields use quotes

1, 7, "allow commas, sample"

dickersonka 104 Veteran Poster

If you have your images stored locally, then you might want to try to use Server.MapPath to load them.
Sample

//lets assume this path was returned from the database
Server.MapPath("~/images/filename.jpg")

then run the thumbnail code


there are quite a few ways to go about, a good way could to create a page that simplete does image processing like this
Here's a good link to check out.
http://www.codeproject.com/KB/aspnet/generate_thumbnail.aspx?display=Print

dickersonka 104 Veteran Poster

This should work. This will get the value of the column for a row. You can do the looping.

obj val = this.dgvFiles.Rows[0].Cells["checkBoxColumn"].Value;
dickersonka 104 Veteran Poster

Its built into .net
This is C# but same thing

//put your image path here
string imgPath = "";
System.Drawing.Image img = Image.FromFile(imgPath);


Image thumbnail = img.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

You must add the callback, but its not used.

dickersonka 104 Veteran Poster

this is hibernate, relating database to OR mapping

dickersonka 104 Veteran Poster

Hmmm. Something is up with that. Are you running SQL 2000 and SQL 2005 on that machine then?

dickersonka 104 Veteran Poster

As long as you are sure the the datasource is correct and you can 'ping' the server then you need to configure the sql server to allow tcp ip connections.

Here's some links to show you how
http://www.datamasker.com/SSE2005_SCM1.htm

http://www.datamasker.com/SSE2005_SAC.htm

dickersonka 104 Veteran Poster

For this you can use a query string or session, query string might be easiest.

[B]connect.aspx.cs[/B]
protected void picUpload_Click(object sender, EventArgs e)
{
int year = 1870;
Response.Redirect("upload.aspx?year=" + year.ToString());
}

in the receiving page
private void Page_Load(object sender, System.EventArgs e)
{
int year = Convert.ToInt32(Request.QueryString["year"]);
}
anitha joe commented: Really Helpful +1
dickersonka 104 Veteran Poster

Disadvantage i agree is a lookup, doesn't necessarily have to be dns if you use the ip, but once again that might be bad practice.
Advantages would be scalability and most likely replicating the production environment. Issues can exist that you won't realize until production by using separate machines. Assuming you are in school and creating smaller applications, you might not need to worry about it yet. For larger enterprise applications it is ideal to separate out, for academic purposes its not of the highest priority.

dickersonka 104 Veteran Poster

The dataset table, not the sql table

Dim ds As New DataSet("uploads")

....

 dgBlowOut.DataMember = "uploads"
dickersonka 104 Veteran Poster

try setting the datamember
The dataset can have multiple tables, when you set the datasource you need to specify which table to use

dickersonka 104 Veteran Poster

If you are using asp.net you need to use bind

dickersonka 104 Veteran Poster

Are you using firefox? It won't display in non-ie browsers.

dickersonka 104 Veteran Poster

Where are you calling countfile from?

Also ensure you have proper access on the c:\pictures\ directory, remember IIS is most likely using the asp.net service account to read the directory. You need to set the app pool user with permissions on this folder.

dickersonka 104 Veteran Poster

Try uninstalling and reinstalling the video driver.
Try a new monitor and try a new video card if possible and display cable.
It sounds like either, the video card, monitor, or display cable is bad.

dickersonka 104 Veteran Poster

select * from table
group by sapno
order by amt desc

dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

It might be, could be in /usr/share or /usr/share/bin, is it giving a classnotfound when you try to use it this way?

dickersonka 104 Veteran Poster

Yes its in C#

dickersonka 104 Veteran Poster

Take a look at exams 70-528 and 70-536. There are reference materials available from microsoft for these specific tests. Research MCP (Microsoft Certified Professional).

dickersonka 104 Veteran Poster

There are different areas of it for sure. There are programming/networking/design/implementation categories amongst others.

Advice would be to research tech jobs/categories. They are all related, but much different. Strengths in logic and math, I would say programming but its not just something to pick up so easily. Take your time and do some research to see what area matches what you are looking for and expertise.

dickersonka 104 Veteran Poster

to get the files use

string dir = @"C:\images\";
string[] files;
int numFiles;

files = Directory.GetFiles(dir);
numFiles = files.Length;

string nextFileName = (numFiles + 1).ToString() + ".jpg";
dickersonka 104 Veteran Poster

The option you needed is the workstation components, so you can run management studio with running sql server on the same machine.

dickersonka 104 Veteran Poster

Might be with the dns exploits recently. Where the site you expect isn't always the one thats resolved.

dickersonka 104 Veteran Poster

Add the same code to the form_shown

dickersonka 104 Veteran Poster

Add a custom action for uninstall.
You will need a code file for it that inherits from Installer. When you add this to the installer, it will be part of the package, but you can override uninstall to delete the directory.

dickersonka 104 Veteran Poster

Typically no. Employees and Country would be good for the table names. There should be no difference whether the you have a 'fixed' set or not.

dickersonka 104 Veteran Poster

I see the relationships, but don't see the actual columns.
In the business table, you need the columns GENRE_ID, CATEGORY_ID, and SECTION_ID.

For the businesses without categories, you can just set the column to be null.

dickersonka 104 Veteran Poster

When they are being loaded assign the id to either the tag of the row, or in a column.

Assuming you are waiting until a save or submit button is pressed, loop back through all the rows of the gridview. Get the checkbox column for each of the rows and get the id column or tag as well. Then you can pass those values on.

dickersonka 104 Veteran Poster

Table layout panel is good, but not for something like this due to the number of rows you might have with dynamic sizing. Use a gridview and add a checkbox column to the row that the user can edit.

dickersonka 104 Veteran Poster

Not the easiest task if you are just starting out, but here's the concept.

You can create a table with the same structure and use it for auditing. Use the triggers to catch the insert,update, and deletes and then store the records into the second table as well.

Or you can create a single table for all changes and record them, composing dynamic statements on the fly.

Then you can create an aspx page like normal, and select from the audit table.

If you have very few tables and just starting out, i would suggest the first route. It really depends on how you are wanting to display and if you are wanting to query the data back. If you need any further explanation feel free.

Here's a link of something similar.
http://www.4guysfromrolla.com/webtech/091901-1.shtml

dickersonka 104 Veteran Poster

Isn't it UID instead of User?

dickersonka 104 Veteran Poster

jdbc driver needs to be
Class.forName("com.mysql.jdbc.Driver");

dickersonka 104 Veteran Poster

Are you searching the correct container?

ie if you add it to a panel. Use panelId.FindControl