|
A quick look shows that I can find solution in this after some cropping
Thanks and Regards
Amar Chaudhary
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Yes you will need to make some modifications but not major ones.
|
|
|
|
|
its working
Thanks a lot
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Can any one tell me how to load xml grammar from file? In sapi 5.1 using sppechlib namespace, we can load it through SAPIGrammarfromfile("name of file"), but how to do this in .net 3.0 using system.speech lib?
Heres the method for loading Grammar in .net 2.0, using SpeechLib namespace.
SAPIGrammarFromFile("XMLActivate.xml");
|
|
|
|
|
How i can delete a sepecific table from a dataset
Thanks in advance
Assaf
|
|
|
|
|
myDataset.Tables.Remove ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
well i remove the table from the dataset but the datagridview didn't show the new data
i put dtgCreditInfo.Refresh();
Thanks in advance
Assaf
|
|
|
|
|
You can use mydataset.Tables.Remove() or mydataset.Tables.RemoveAt()
|
|
|
|
|
well i remove the table from the dataset but the datagridview didn't show the new data
my code is:
ds.Tables.Remove("CreditCardInfo");
adap.SelectCommand = cmd;
adap.Fill(ds, "CreditCardInfo");
dtgCreditInfo.DataSource = ds;
dtgCreditInfo.DataMember = "CreditCardInfo";
dtgCreditInfo.Refresh();
thanks in advance
Assaf
|
|
|
|
|
hi
i'm using mssql server express edition like server with a internet connection.
i wanna connet my database remote machine which have internet connection from anywhere for only select statement.
But i dont wanna using ISS.
how can i solve this??
murat
|
|
|
|
|
hi
you dont need iss to run remote connections in sql server 2005 express.
try this link:
link
i've also had to set a specific dynamic port for all ip's.
In SQL Server Configuration Manager choose SQL Server 2005 Network Configuration and Protocols for server name (default SQLEXPRESS).
Now choose TCP/IP and in IP Addresses tab in IP ALL set TCP Dynamic Ports to something else.
If your SQL Server is on pc which connects to internet thats all, if not you must direct chosen port to your pc with SQL Server (it's IP adress in LAN)
Pawel
|
|
|
|
|
Hello
How i can fill the datagridView from the dataset
instead to the select statment from the database
Thanks in advance
Assaf
|
|
|
|
|
Hi again i´m 95% finished and i cinya need this code.
Would appreciate if you helped me.;)
This is the question:
i have one listview1 with timer hwo gets the subfoldername and count files in it and gettime.now. i want to comare subitems[0] and [1] to another listview.
like this
listview1:
Online, k44101, 2007-09-09 21:44:21, , ,122 sides,
listview2:
Online, k44101, 2007-09-09 19:24:20, blahblah.
If [0] and [1] match like this example i want to pass subitem[3](blahblah) to listview1.subitems[3] and calculate 21:44:21 - 19:24:20 to get the work time like this example are 2:20:01 and pass that to listview1.subitems[4].
Can you help me get started?
This is my first program and i have to be finished this week
I have googled and searched in the internet but i don´t find out how to compare.
tnx mates!!!!;P;)
|
|
|
|
|
It depends on whether or not you are comparing strings or the date/time values. With strings you can obtain the item's text (Item[n].Subitems[0].Text) at that desired index (n) in each of the the listviews. Then compare the strings.
if( String.Compare(str1, str2) == 0)
{
}
OR...,
if (CultureInfo.CurrentCulture.CompareInfo.Compare(str1, str2,
CompareOptions.IgnoreCase) == 0)
{
} If you are checking the date/time. You need to convert the string to DateTime format then check it using:
DateTime t1 = DateTime.Parse("2007-09-09 21:44:21",
CultureInfo.InvariantCulture.DateTimeFormat);
DateTime t2 = DateTime.Parse("2007-09-09 19:24:20",
CultureInfo.InvariantCulture.DateTimeFormat);
if (DateTime.Compare(t1, t2) > 0)
Console.WriteLine("t1 > t2");
if (DateTime.Compare(t1, t2) == 0)
Console.WriteLine("t1 == t2");
if (DateTime.Compare(t1, t2) < 0)
Console.WriteLine("t1 < t2"); Of course the time date string does not have to be a literal.
Mark
|
|
|
|
|
str1 and str2 are strings from subitems??
It gonna work like this:
when items adds in listview1 it gonna compare subitems[0] and [1] with subitems[0] and [1] in listview2. if they match, pass info listview2.subitems[4] to right item in listview1 and calculate the time... and remove that item in listview2!
How would you do??;P (some code strip)
even hard to excplain!
Appriciate this man!!!
|
|
|
|
|
I understand what you are trying to accomplish. You should read up on the properties of the ListView control. When you fully understand the properties you will have no problems accessing and manipulating ListView strings.
The Items collection contains all the indexed items (0,1,2, etc), each Item can have SubItems (0,1,2, etc). For example, suppose I want to get a filepath from the ListViewItem that I have found. The path is the second subitem and the filename is the first subitem.
ListViewItem lvi = fileListView.Items[9];
string filename = lvi.SubItems[1].Text + @"\" + lvi.Text; Now that I have the string I can do something with it (Compare!?). Be careful when iterating through lists and indexing items. If the you try to access an index that is more or less than the "Count" property of the ListView. It throws an System.ArgumentOutOfRangeException error.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview_properties(VS.71).aspx[^]
Look at the examples there too.
Mark
|
|
|
|
|
ok... i check it out..
string[] lines = System.IO.File.ReadAllLines("dataapplikationer.txt");
Int32 index = 0;
while (lines.Length >= index + 10)
{
if ("#" != lines[index].Trim())
{
index++;
continue;
}
String appl = lines[index + 1];
String path = lines[index + 2];
String dest = lines[index + 3];
String pris = lines[index + 4];
String sort = lines[index + 5];
index += 10;
System.IO.DirectoryInfo subDI = new System.IO.DirectoryInfo(path);
foreach (String sub in Directory.GetDirectories(path))
{
foreach (String file in Directory.GetFiles(sub, "*.ini"))
{
String row5 = File.ReadAllLines(file)[4];
String section = row5.Substring(9, 6);
String subName = sub.Substring(sub.LastIndexOf(@"\") + 1);
DateTime time = DateTime.Now;
ListViewItem item = new ListViewItem(new string[] { sort, subName.ToString(), time.ToString(), "Summa tid", section, "AD", pris, appl });
this.listView2.Items.Add(item);
this.listView2.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
}
}
}
but how do i build it together in this code i want the sort, subName.Tostring() to compare in all items in listview1 and if it founds one equal then calculate time "summa tid" and pass by "av"??
Please man! help me build it together... peace!
|
|
|
|
|
Hi there .
I have a problem with SqlServer 2005 Log file .
I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error.
I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error:
"Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)".<br />
Could not open new database 'DbName'. CREATE DATABASE is aborted.<br />
Cannot attach the file 'FilPath.mdf' as database 'DbName'.<br />
File activation failure. The physical file name 'filpath_log.LDF' may be incorrect.<br />
The log cannot be rebuilt when the primary file is read-only.'
I wonder to say sometimes attachment works but sometimes not.
I already did this attachment process with SQLServer 2000 and it never gives me error .
DMASTER
|
|
|
|
|
I am new to programming and just started learning C#. I am using Visual C# 2005. I am working on a project where the user enters 5 digit # and then I need the digits to display separated by a space. This is a console application.
I got as far as asking to enter # then displaying the digits by using / and %. I am having a problem showing the 2nd, 3rd and 4th #.
How do you get the just the 1st digit to the right of the decimal to show. I used for example:
digit1 = ( value1 / 10000);
digit2 = ( value1 % 10000);
digit3 = ( value1 % 1000);
digit4 = ( value1 % 100);
digit5 = ( value1 % 10);
I am having a problem with the 2nd, 3rd and 4th to display only the first digit to the right of the decimal. All have been declared int..any help is appreciated, thanks
Thanks. Hope my post is okay with detail if not let me know, this is my first post
|
|
|
|
|
Hi - welcome to Code Project.
digit2 = value1 % 10000
will give you the remainder when dividing by 10000. In essence, this means it will give you the last four digits. To get just the one digit, you'd also have to strip to the right, so something like this should work
Math.Floor((value1 % 10000)/1000)
The mod (%) strips values to the left, then the divide strips to the right. Finally, Math.Floor stops a result such as 3.6 from rounding up.
The other approach is to do this:
string number = value1.ToString();
digit1 = int.Parse(number[0]);
digit2 = int.Parse(number[1]);
etc
You don't need to use int.TryParse or char.IsDigit, as you know the values are all numbers. You DO have to make sure your number is 5 digits long, I'd be inclined to store the values in a list or an array, then you can write code that works with any length number.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Another possibility is comething like this. Obviously this will destroy the input value, but if its needed it can be saved first.
int[] digit = new int[5]();<br />
<br />
for( int i = 4; i >= 0; --i )<br />
{<br />
digit[i] = value % 10;<br />
value /= 10;<br />
}
All the Best
Julian N.
-- modified at 9:09 Sunday 9th September, 2007
|
|
|
|
|
How to create textbox in c#..?? And how to set the tab space..??
|
|
|
|
|
You can drag it from the toolbox and drop it on the form to have it created automatically or you can create it like this:
TextBox mybox=new TextBox();
|
|
|
|
|
Hi
i want to drag item from listbox onto datagridview.
Can anybody provide coding 4 that....
Thanx in advance
|
|
|
|
|
hi
i want to send a message with "at commands" (and gsm modem).
i can send message and receive message.
and now that want to send a Unicode message (Arabic) can not !
can you guide me to send a Unicode with gsm modem and "at command" or any other command via serial port?
tanks
|
|
|
|