Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View PHP questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by NeverJustHere (Top 26 by date)
Unfortunately, there is no automatic conversion from database values to Nullable int, so you need to code this yourself.
Use something like (from memory, so may need fixing):
NullableInt = dbField.IsNull ? Nothing : dbField.GetInt()
Why do you not need this mystring.Replace("\"","s"); ??
There is nothing wrong with using int for data that can be null.
The difference is the string type natively supports null, int does not. The string type is a little unusual in .net in this regard.
The int type can be wrapped around a null manager by using nullable<int>. This would be the correct way of representing any number that may not exist, rather than converting them all to strings.
If it's YOUR computer, then set up a scheduled job.
Your question is too vague. We need more details.
Then maybe it reports errors without using an exception. You should read the documentation for the mail library you are using.
Is it possibly related to the length of the arguments? Try with a shorter argument length. I have a vague recollection of a 255 character limit, but that may be on older version of windows.
Apologies, I wasn't intending to be rude, but I can see what I wrote doesn't read nicely.
Try speaking in an American accent :)
I'm only half joking. The only experience I have with Speech to Text was a system installed in Australia in the late 90's using Dialogic Speech to Text recognition boards. The accuracy improved significantly when we got them to provide an Australian accented pattern.
We were only attempting to distinguish Yes/No answers over a telephone line.
Yes. You can do a cross join. It will join all rows of table A with all rows of table B.
Yes it can be done with SSIS. This article seems to be a ood starting point for SSIS. http://www.codeproject.com/Articles/173918/How-to-Create-your-First-SQL-Server-Integration-Se
You say "I want my data to be update when my data source be update or change". Do you mean it really needs to be at the same time, or is a process that runs on a schedule sufficient?
If the update needs to be at the same time, there are a couple of more complex solutions you could look into:
1. Triggers to update the other database. These will have a performance impact, and a reliability dependency.
2. Database clustering - but this is more for performance concerns.
The other possible solution would be to use database replication. SQL Server has a replication system that will keep a slave in sync with a master database, with minor delay between changes propagating. It can be fiddly, and difficult to diagnose when something goes wrong. It also can use a lot of extra disk space.
Inf possibly means you are performing a divide by zero somewhere in the calculation.
Since we don't have the data you are using, we cannot determine exactly where the error is.
I suggest you put some debugging code in to see what all the divisions are actually doing. Hopefully then, the issue will become clear to you.
There is a better way to do this.
If the databases are on different SQL Servers, you can create a link between them. http://technet.microsoft.com/en-us/library/ms188279.aspx
You can then access Server2 from Server1. So, in a SP on Server1, you can select * From Server2.Database.Table and fetch the data.
Then for scheduling, use a SQL Server Job. It can be set to execute a SP on whatever frequency you require.
That SP will then move the data from one server to another.
There is no need for a windows service for this.
1. Run it through the profiler to see which parts are slow.
2. Try to re-write it to not use cursors. If this logic can be replaced with normal SQL set based operations, you shuld see a big improvement in speed. Cursors are slow.
I hope that is not real data you posted :)
Look at the definition of atoi. Is that really what you want to be doing?
As Sergey said - run the code in the debugger, put in break points, you can examine the values of the variables throughout each step of the loop. This is a really useful way of finding errors.
This type of software is big and complex.
There is an open source system called Squid that you should look at if you wish to understand how these types of systems work in detail.
It is c/c++ codes rather than c#.
Your question doesn't make any sense. Please edit and state more clearly what you are having trouble with.
Why do you want to split the data across multiple data tables based on data type?
Why is this better than having all the data in one table?
OK, I understand better now.
You need to change the font to a fixed width font. This will be a property on whatever text control you are using.
The console uses a fixed width font. A fixed width font has each letter taking the exact same width.
As an alternatice, in Silverlight you could use 6 different text controls, and align them as you want. Then each of the controls gets a different part of the text.
I'm not quite understanding the problem here.
Is it that the upload is overwriting a previously uploaded image? If so, you need to make sure the upload filename is unique.
You should use the code formatting features available to make your code easier to read.
Have you looked at the source generated by the php script for any clues as to why it's not working?
The in clause is equivalent to (T.SP_EAT_ID = 15 or T.SP_EAT_ID = 16).
You can see this when you use a column name that doesn't exist - you get an error for each value of the in clause.
The UNION ALL merges two result sets, on where T.SP_EAT_ID = 15, and one where T.SP_EAT_ID = 16.
These two ways of expressing the query look equivalent.
The difference between the your two queries is the impact of the TOP 1 and the ORDER BY statement.
The first query asks for the TOP 1 record, ie the first record in the unordered result set. This is up to the database to decide, and may be non-deterministic.
The second query asks for the TOP 1 record ordered by T.SP_EAT_ID, so the first record once the result set has been ordered by T.SP_EAT_ID. If the result set can contain multiple rows with the same value for this column, it may also be non-deterministic.
The Row index is 0-based, not 1-based. This is why the for loop starts with i=0. When Rows.Count = 6, the 6 valid Rows[i] are where i = 0,1,2,3,4,5.
(Other languages would use 1-based arrays, but c# is 0-based)
If you try to access Rows, you are asking for the 7th Row, which doesn't exist - hence the error.
An alternate way of iterating through the Rows collection is to use the for each loop
Foreach (DataRow row in ds.Tables.Rows)
So, what happens if the click point is not in any of the rectangles returned by GetTabRect? Maybe completely outside of them, or in-between them (assuming styling adds space between to adjacent tabs).
Sometimes simple, slower and safe is better is better than the alternative.
Last Updated 1 Jan 1900
All Rights Reserved.