|
Probably, but that would be something database specific...
Normally you don't need to care about the encoding. The database driver should give you string data as strings, not as encoded byte arrays.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Normally not... but the problem is that all language specific char may not be read correctly. For exemple instead of ü i get | ... to solve that problem I have to decode the table (this is already done)
The problem is that some times I get tables that are already encoded correctly... in that case I don't need to decode the table...
Life is not short... the problem is only how you organize yourself
|
|
|
|
|
Hi
I am with a cheque printing software, how can I print a forms textbox data with out the forms background
Thanks & Regards
modified on Thursday, July 24, 2008 3:39 AM
|
|
|
|
|
Have a look at the PrintDocument[^] class.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I'm trying to connect remotely from phone to pc. Currently I tested it in cradle mode. When I tried running my program (which is in the phone) it occured an error: Cannot find DbNetlib.dll. However, when I tried a pc to pc wireless connection (using an emulator) it works. It connects to the server just fine. Does anyone know how I can make my PDA phone connect to the server? I'm just copying the .exe file of my project file by the way.
modified on Thursday, July 24, 2008 3:45 AM
|
|
|
|
|
harcaype wrote: Cannot find DbNetlib.dll
And do you expect that it SHOULD be able to find this dll ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
yes. Anyway, I was able to make it work now. Thanks though!
|
|
|
|
|
Hi All,
i need to call a c# code in my java program. i followed the approach given in the codeproject link: http://www.codeproject.com/KB/cross-platform/javacsharp.aspx but there are some issues in generating netmodule , which is required to perform further steps. but it is giving an error
"csc /debug /t:module "bin\Debug\\HelloWorld.dll"" exited with code 9009 on using post build event command line.
Command is:
E:\c#\getOLCont\getOLCont>csc /t:module form1.cs
the error is:
fatal error CS0009: Metadata file 'c:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.0\System.Workflow.ComponentModel.dll'
could not be opened -- 'File is corrupt.'
i have tried the command on different machines but there is same result.
please tell a way to solve this problem.
Regards
Kapil
|
|
|
|
|
Hi,
I have a windows application and I have added a setup project to this application. Im using the custom installer class as I have to run a batch file after the application is installed.
For this, im using overriding the OnAfterInstall event of the base class and have added code there to start a new process that runs the batch file.
The problem is the OnAfterInstall Event is not raised at all. I have added message boxes to check if the events are raised. Also tried the OnBeforeInstall event but in vain.
Need a solution asap. Any help or directives on this wud be very helpful
Thanks,
Shri
|
|
|
|
|
Have you added the component to the custom actions window of your setup?
|
|
|
|
|
HI, I want to iterate only those rows of excel sheet where the data have written, means if user has filled only first 15 rows then my loop should iterate to 15 only,hO wcan i do that Below is sample code which iterates up to 65536 rows,unnecessarily ,but the data are present only in first 15 or 18 rows. Please give me a solution or an idea
This is my sample code
Microsoft.Office.Interop.Excel.Application Excelobj = new Microsoft.Office.Interop.Excel.Application();
if (Excelobj == null)
{
MessageBox.Show("Excel couldn't be started", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Workbook workbook = Excelobj.Workbooks.Open(fdgExcel.FileName,Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing , Type.Missing, Type.Missing);
Sheets sheets = workbook.Worksheets;
Worksheet worksheet = (Worksheet)sheets.get_Item(1);
for (int i = 2; i < worksheet.Rows.Count;i++ )
{
Range range = worksheet.get_Range("A" + i.ToString(), "C" + i.ToString());
}
|
|
|
|
|
int lastUsedColumn = worksheet.Cells.SpecialCells(XlCellType.xlCellTypeLastCell, Type.Missing).Column;
int lastUsedRow = worksheet.Cells.SpecialCells(XlCellType.xlCellTypeLastCell, Type.Missing).Row;
should tell you the last used row and column
|
|
|
|
|
i want to create crystal report for access(password protected)database.i do it bu this project run another computer error messege come loginfo.
please help.i want to diploy database datadirectory.i using visual studio 2005 exprees editon.(crystal report for .net framewort 2)
get more example.because i am biginner
|
|
|
|
|
lankaudaranga wrote: get more example.because i am biginner
So I see. Hence the useless subject, I guess.
I would suggest you buy a beginner book and work through it, start with someting simpler, then work up to this. If you're being paid to do this, let your client know they made a poor choice and they should move on.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
lankaudaranga wrote: .because i am biginner
That's no excuse, and use more descriptive subject lines
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi i am sending mail from my windows apllication...,
For a particular mailid, i am attaching more than one files also...,
Now my question is, " Is there any size limit is there for attachments to send mail for a particular mailid?...,
If there upto how much size i can able to send?,
And one more thing is if i want to send more than that size any cod i have to modify or add?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hmm.. I think the limit is not in your application, but the limit in in mailserver.
You must increase the limit in your mailserver.
|
|
|
|
|
It depends on mail server.
|
|
|
|
|
Hi i am sending mail to different ids...,
Everything going on well....,
I am going to make this application to exe and put it in schedular task...,
This things will execute automatically...,
Now my probs is suppose mailserver is down...,
Then it will be probs in mailsend...,
So in that case how to handle the code.., it mean if the mailserver will down or mail didnt send properly...,
Then it have to be fire again, after some minutes or some other condition have to do how to do that?
This is my code:
DirectoryInfo dInfo = new DirectoryInfo(mypath);
DirectoryInfo[] dInfos = dInfo.GetDirectories();
foreach (DirectoryInfo d in dInfos)
{
MailMessage mailMessage = new MailMessage();
MailAttachment attach = null;
mailMessage.From = "Magesh@Test.com";
mailMessage.To = d.Name;
mailMessage.Subject = "Hi";
//mailMessage.Body = "Hi This One Is For Testing
FileInfo[] fInfos = d.GetFiles();
foreach (FileInfo f in fInfos)
{
attach = new MailAttachment(f.FullName);
mailMessage.Attachments.Add(attach);
}
SmtpMail.Send(mailMessage);
mailMessage.To = "";
attach = null;
}
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You need to catch the errors and persist the failed mail details. When it executes next time, read from this persisted data and try to resend.
|
|
|
|
|
but my senior talked an=bt some thing emi or dmi whats that?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I'm using the following code to roundtrip a value between one Int64 var and two In32 vars.
public static Int64 Int64FromPersistentIDs(int highID, int lowID)
{
return (((Int64)highID << 32) + (Int64)lowID);
}
public static void PersistentIDsFromInt64(Int64 longID, ref int highID, ref int lowID)
{
lowID = (int)(longID & 0xFFFFFFFF);
highID = (int)((longID >> 32) & 0xFFFFFFFF);
}
This code roundtrips well when highID is positive, and when highID is negative and 9 digits, but it fails as soon as highID is negative and 10 digits - the highID comes back as off by one (one too large).
What am I doing wrong here?
|
|
|
|
|
int64 is up to 19 digits and
Max/Min value is +/-9,223,372,036,854,775,808 ,
where int32 is only 10 and
Max/Min value is +/-2,147,483,647
what your'e doing is spilling bits off by (int)(longID & 0xFFFFFFFF);
int is Int32 and not int64
Have Fun
Never forget it
|
|
|
|
|
Actually, that wasn't it. I think.
I went back and changed all Int64 to UInt64, and it stopped failing in all cases.
|
|
|
|
|
Can you give an example that does not work?
Using your methods, I plugged in some numbers and, round trip, it works just fine (even without changing the types to unsigned).
static void Main(string[] args)
{
int highID = -1234567890;
int lowID = 123456789;
Console.WriteLine("Build 64-bit ID:");
long longID = Int64FromPersistentIDs(highID, lowID);
Console.WriteLine("highID: ({0,20})", highID);
Console.WriteLine(" lowID: ({0,20})", lowID);
Console.WriteLine("longID: ({0,20})", longID);
Console.WriteLine("\nExtract-32 bit IDs:");
PersistentIDsFromInt64(longID, ref highID, ref lowID);
Console.WriteLine("longID: ({0,20})", longID);
Console.WriteLine("highID: ({0,20})", highID);
Console.WriteLine(" lowID: ({0,20})", lowID);
}
public static Int64 Int64FromPersistentIDs(int highID, int lowID)
{
return (((Int64)highID << 32) + (Int64)lowID);
}
public static void PersistentIDsFromInt64(Int64 longID, ref int highID, ref int lowID)
{
lowID = (int)(longID & 0xFFFFFFFF);
highID = (int)((longID >> 32) & 0xFFFFFFFF);
}
Outputs:
Build 64-bit ID:
highID: ( -1234567890)
lowID: ( 123456789)
longID: (-5302428712118268651)
Extract-32 bit IDs:
longID: (-5302428712118268651)
highID: ( -1234567890)
lowID: ( 123456789)
|
|
|
|
|