|
I once managed to get SQL 2005 to generate duplicate GUIDs. My insert statement managed to generate set of three identical GUIDs pretty consistently. Unfortunately we could never replicate this outside of our, rather large, application and so ended up just doing it differently. It was probably to do with the records being generated within the same millisecond, and so not that likely in most applications.
So, yes you should definitely check. While in theory you should never get duplicates I have had them to often.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hi,
How to Browse my Basic .aspx file with HTTPS instead HTTP, I come to know that it is possible through SSL, Is it any other way I can browse Page with Https.
I want to transfer a page which is cxml file with http how can i do it.
|
|
|
|
|
The only way to view any web page over https is to enable ssl connections to your webserver. That is what https means. However the resulting webpage will look the same either way so I would not bother to enable https connections on a development server, only on your live web server.
For details on how to set this up check out some of these sites[^].
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
|
that's three filled circles: big black, medium white, small black.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Thanks.
Couldn't we draw it with a circle command ?
|
|
|
|
|
what's a "circle command"?
I'd use Graphics.FillEllipse()
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I suppose you could just use simple clipping when drawing these circles.
Life is a stage and we are all actors!
|
|
|
|
|
hi,
can anyone tell me that is it possible to generate report with crystal report from windows service.
thanks
tbhattacharjee
|
|
|
|
|
Hi,
I have to read an xlsx file in which there are multiple columns. One of it is a 'Date' column type. I am using OLEDB with Microsoft.ACE.OLEDB.12.0 as the provider. The problem is, suppose if there is a non date value (Error data) in the column the oledb is replacing the error data with null. I have a requirement to show the all data (good data as well as the error) to user who is reading the excel file into our database.i.e. i dont wnt the engine to convert the value to null
When reading xls file,which can be done by using Microsoft.Jet.4.0 provider, we can overcome this by changing property of IMEX=1 and changing the 'Typeguessrows=1' in the registry. But unfortunately this provider cannot be used for reading an xlsx file.
Can anyone help me how to overcome this problem??? I have also listed down the code below which i am using for reading the file
DataSet ds = new DataSet();
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FileName + ";Extended Properties=\"Excel 12.0;HDR=YES;IMEX=1;MAXSCANROWS=0\"");
con.Open();
try
{
DataTable dt = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
string sheetname = dt.Rows[0]["TABLE_NAME"].ToString();
OleDbDataAdapter myCommand = new OleDbDataAdapter(" SELECT * FROM [" + sheetname + "]", con);
myCommand.Fill(ds);
}
catch (Exception ex)
{
string exce = ex.Message;
}
finally
{
con.Close();
}
return ds;
|
|
|
|
|
Hi,
I got same problem when i am reading Excel 2003 file with Excel 2007 connection string.It shows the values in data table as empty.But,it shows the Titles.
|
|
|
|
|
hi
i have problem with end of process.
i need to zip file - and after i zip - i need to do some thing with this zip file...
the problem is, although the messagebox appear - i noticed that the process is not end.
how i can know for sure that the process is end ?
my zip sample:
try{
if (File.Exists(@"c:\DaZIP\Bind.sdf"))
File.Delete(@"c:\DaZIP\Bind.sdf");
File.Copy(Application.StartupPath + @"\Bind.sdf", @"c:\DaZIP\Bind.sdf");
byte[] sampleBuffer = null;
ZipEntry sampleZipFile = null;
FileStream sampleFileStream = null;
ZipOutputStream sampleOutputStream = new ZipOutputStream(File.Create(Application.StartupPath + @"\Bind.zip"));
sampleOutputStream.Password = "12345";
sampleOutputStream.SetLevel(9);
foreach (string sampleFile in Directory.GetFiles(@"c:\DaZIP")) {
sampleZipFile = new ZipEntry(Path.GetFileName(sampleFile));
sampleOutputStream.PutNextEntry(sampleZipFile);
sampleFileStream = File.OpenRead(sampleFile);
sampleBuffer = new byte[sampleFileStream.Length];
sampleFileStream.Read(sampleBuffer, 0, sampleBuffer.Length);
sampleOutputStream.Write(sampleBuffer, 0, sampleBuffer.Length);
}
sampleOutputStream.Finish();
sampleOutputStream.Close();
}
catch (Exception ex){ MessageBox.Show(ex.Message ,"",0, MessageBoxIcon.Exclamation);
return;}
MessageBox.Show("End ZIP");
i work on VS2008 C# WinForm
i know that the process still work, because when i try to do somthing with the zip
file, i get error that the file is in use. and if i wait for 1-2 minute, i can do what i
want with this zip file.
|
|
|
|
|
E_Gold wrote: i know that the process still work, because when i try to do somthing with the zip file, i get error that the file is in use
That may well be a wrong conclusion. The one way to know whether a process is (still) running or not, is by looking at the Task Manager's list.
Here is what is probably going on:
if you want write or delete access (anything other than read access) to a file that just got created (by yourself or someone else, does not matter), chances are you will find the file is being accessed by some other process, and your access is not granted.
The other process very likely is some server code that is there to assist you somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so they can inspect them.
Microsoft is aware of the consequences; Windows Explorer will try rename and delete attempts up to five times (with one-second interval), and only reports failure if the action continues to fail for that time.
The solution:
1. either use a different file name (not always acceptable)
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer for this)
BTW: if all you need is Read, make sure to allow others to read as well, i.e.
use File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)
Remark: in my experience, trying to open/append/close a file more often than once a second succeeds all the time, seems like the inspectors allow for at least one second of inactivity before opening the files themselves.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hey everyone,
I'm looking for a way to either hook my C# application to a instant messenger (like msn) or make a full C3 instant messenger application with which I can talk with a friend of mine that I will give the same application.
Basicly I'm trying to make me a own chat enviroment but I want it to be save against hackers (no needless open ports) and it has to be not lan since my friend lives about 40 km away from me
Any help will be usefull.
ps. So far i have not yet found anything that can tell me if C# can execute events on MSN receieved messages and/or C# can send messages via msn. Have not looked in to other messengers (like aim or icq.. or whatever)
|
|
|
|
|
Hey again everyone,
I found out it's easy to use a mircbot as between me and my friend for communication
Cheers
|
|
|
|
|
Hello,
I need to develop one application say, if i speak "run notepad", notepad should be opened.
For that i have use following code to implement speech recognition,
SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine();
DictationGrammar gram = new DictationGrammar();
recognizer.LoadGrammar(gram);
recognizer.SetInputToDefaultAudioDevice();
recognizer.RecognizeAsync(RecognizeMode.Multiple);
void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
MessageBox.Show(e.Result.Text);
}
I don't know how to add grammer, please help me out.
Thank you in advance.
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:18am.
|
|
|
|
|
Hello,
Thank you for reply.
But i don't understand that msdn dictationgrammer(), so please tell me in details what should i do.
And if i write in vista will it be work in xp too?
Please help me.
Thank you.
|
|
|
|
|
Im looking for info on how to create bots that interact with with the screen.
I want to create bots that "sees" the screen and interacts with it in a way that i program.
For example a flash game of tic tac toe or chess, or a normal webpage
I not so much in need of games solving algorithms at the moment...at the moment i need information on how i make the bot retrieve/interpret/interact with the screen.
|
|
|
|
|
Dear Merger,
Well, you could do this in a few different ways depending on what you want to interact with. You could pole for positions of windows to see if they have moved, you can use directx or XNA (I suppose) to track the mouse's position, clicks and keyboard events...If you're wanting a way to collectively get information about the screen all in one swoop (the visual information in the screen, window positions, titles, mouse position, clicks, keyboard events, etc), I don't suppose that's possible: you have to do it all independently. If you want a bitmap of the screen (like obtained by pressing `print screen') I'm sure that's very easy...let me do a quick Googler...yup, there it is:
Graphics.CopyFromScreen(...));
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.copyfromscreen.aspx[^]
So, if you could be WAY more specific, you will get more responses.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
Thanks for your reply...here is a little more information to clarify.
Im not sure what i wanna do quite yet I can see alot of possibilities though.
But for an example:
An online chessgame. I want to enable my program to play automatically.
For that to be possible i see a few problems that needs to be solved.
1. The program must gather the information from the screen, that should be quite easy to do with the method you posted above.
2. The program needs to analyze the information on the screen. In this example it needs to recognize the chessboard, the chesspieces and probably something else.
3. The program needs to calculate the best move.
4. The program need to interact with the chess program.
1,3 and 4 i think i know how to handle. But i dont know how to handle the second problem.
So what im asking about is probably links or information on how to interpet the information of the screen (bitmap)
kind regards,
Anders
|
|
|
|
|
Dear Mr. Anders,
I see what you're talking about now, you're wanting your bot to interact with the Internet. This does seem VERY difficult. My approach (but I have no idea how to do what you're doing) would be to create a program for each scenario. For instance, using Chess, at GameKnot, you know how their board looks, and how the source code for those boards look, so you could have your program get the source code for the current page (the chess game you're playing currently, although this IS cheating acccording to Gameknot regulations, so don't do it there), then calculate the best move, then to put in its move, it would perhaps have to simulate clicks based on where it thinks the squares are. The other option is to see what the code for a click is in the webpage, and somehow make the webpage think you clicked on the desired square...I'm really clueless. Good luck!!
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
This is exactly what i want to do. But it dont have to be a chessgame, that was just an example.
The problem i face at the moment is that i dont know where to start. Sure i can get a screenshot of the chessboard, but then what? How do code something that recognizes the board and chesspieces?
Im assuming that it would be very error prone and ineffective to compare every pixel with presaved images (of the chesspices) and try to make my "virtual" chessbord that the computer understand.
So...if anyone know how to interpet images and translate them to something that the computer understand and can calculate i would be very grateful. Link, examples, anything is of interest
Kind regards,
Anders
|
|
|
|
|
Hey guys I have a problem in retriving the cell data from the gridview...Though I had tried with selected index change and row commands........the value it gives is just null...........here is the code
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int row_index = int.Parse(e.CommandArgument.ToString());//gives index of the row
string _commandName = e.CommandName;
Label1.Text = Info_DGV.Rows[row_index].Cells[1].Text.ToString();
}
|
|
|
|
|
hi everyone,i'm a beginner,this is my question;
make DATA show on treeview Automatically
for exeample
Field "class1" and "class2" is in Database "STUDENT"
a、b、c、d,four students are Belong to class1
e、f、g、h,four students are Belong to class2
class1 and class2 as father node
8 students as son node of each father node
how could it show on treeview Automatically?
and when click every student it will Trigger some Matter
please show me the code
Grateful for everyone!
|
|
|
|
|