So I think the problem is solved.
Mr.BunyRabit commented: Gave the code, and it worked +1
gr8fasushi commented: very helpful, thank you! +1
So I think the problem is solved.
When you say
but am unable to read the file
do you mean that the sent mail message has a reference to an attachement that can't be opened?
If so, be sure that in
Attachment attch = new Attachment(sFileName);
sFileName contains a valid file full path (Ie: "C:\some_folder\some_File.txt") and you have almost read permissions to the file, and the content is not blocked by the mail server.
About the @ split, if you need to 'remove' the numeric values from the splitted ones, you can write some thing like
private string RemoveNumbers(string inputString)
{
// This is untested code
var returnValue = new StringBuilder();
const string numbers = "0123456789";
for (int i = 0; i < inputString.Length; i++)
{
if (numbers.IndexOf(inputString.Substring(i, 1)) == -1)
returnValue.Append(inputString.Substring(i, 1));
}
return returnValue.ToString();
}
then change the sentence
string fname = "Dear " + emailIdfname[0].ToString() + "&Family,"
to
string fname = "Dear " + [B]RemoveNumbers([/B]emailIdfname[0][B])[/B] + "&Family,"
Hope this helps
I try to isolate the data manipulation fom the application layer, so I write all the queries in SQL.
Also I mainly use stored procedures for Insert, Update and Delete. This is specially useful when doing complex (multi table related) inserts, updates and deletes thinking in terms of transaction isolation.
Hope his helps
I can only see that the problem will be on the _objState. Is the ed.getStates returnin duplicates?
Hope this helps
After BringToFront you need to set the Focus on that form.
Hope this helps
Yes, you can:
MydataGridView = null;
MyDataGridView = new DataGridView();
Hope this helps
Assumming you have an open connection called PostgreSqLConnection to the server, you need to pass it as the second parameter, not the connection string.
SqlCommand command = new SqlCommand(insertString, PostgreSqLConnection)
But...
In your insertString you have an insert sentence AND a select, so the command will return data. You are lying if you say that this is a non query.
I would suggest to separate both sentences in 2 separated commands.
Hope this helps
Using an "INSERT INTO LinkerTable VALUES (IdFromTable1, IdFromTable2)" sentence to execute an SQLCommand against the database.
In your example, this linktable relates one ticket for one call. The assumption is that one Ticket can have many(m) calls and also a call can refer to many(n) tickets. In this case, you should enter then records in the linkt table to describe each ticket-call relation. Avoid duplicates.
Hope this helps
Just guessing if an OTXTrackRecord in C# has the same signature than a TrackRecord in C++
Sorry, the link fails for me.
Nope. I currently have no Lotus Note installed to test. Sorry.
Maybe, if you put your code and te reference of dlls used in the project, we (the community) can help you to search for a solution.
BR
This is because the transaction for cmdID1 and cmdID2 has not been set.
I'll suggest that as you assign the transaction to the sqlcmd in line 3 of this example, you should add in line 4:
cmdID1.Transaction = trans
cmdID2.Transaction = trans
Hope this helps
@smferoz: did you work at GEARHEAD?
On Excel, Developer, Macros, New Macro, name it Autorun and put wich action you want to do. Save the macro and the book as xlsm. You will need to set the Excel Options to trust macros
When you open the book, this macro will execute.
To open the book without executing the macro, press the shift key while clicking on it.
Hope this helps
Can you try
For Each c As String(,) In al
c(i, 0) = "7"
i = i + 1
Next
Hope this helps
Thanks to clarify
you are welcome
Please, can you post an example of the contents of the arrays and the final foreach you had written to try to reproduce the problem?
Use the GetObject instead of CreateObject.
If a sessions exists, this will attach to the session, else will create a new session.
Hope this helps.
Good example on cypheing.
If I understood well your example, you first enter the plain text, then ask for the key in the btnEncrypt_Click event handler, but IMO the question from Denni_Mwebia is how to force the user to enter the key before entering the txtEncrypt.Text. I am wrong?
Do you want to save the file inside the SQL server? or do you want to open the file, read the first sheet and copy the content to an existing table in a SQL server database?
Please can you be so kind to clarify?
Thanks in advance
Set the Visible to false for the plain text. Then, when the entered key is OK. set the property to true.
Hope this helps
Maybe you already tried
For Each iArr as Array In m_alTabell
This will create a 'new' iArr at each element in m_alTabell
Hope this helps
There is a limit of memory by system http://msdn.microsoft.com/en-us/library/aa366778(v=vs.85).aspx, and a limit by process http://www.oreillynet.com/windows/blog/2006/03/overcoming_the_windows_2gb_cac.html or http://forum.sysinternals.com/process-memory-limit_topic143_post303.html
Maybe you need another approach.
Use the System.Data.OLEDB namespace to create an OLEDB connection to the access database, then use the OLEDBCommand to SELECT, UPDATE, DELETE OR INSERT deata into the access.
Hope this helps
Use a macro with the 'AutoRun' name
Hope this helps
Because a sound is some thing really complex, a byte can not hold enough info tho start playing a sound and stop waiting for the next byte.
If you send one byte at each call to the PlaySound, you will hear nothing or pure noise, or even can crash.
Please refer to http://msdn.microsoft.com/en-us/library/ee663260(v=VS.85).aspx for info on Audio and Microsoft. Special interest for CoDec.
Hope this helps
The FK population from issues to issuesdesc is not automatic, even you define a relation. This info is on ly used in to select info, update existing info or delete related records, but, unfortunatelly, not for insert.
In order to solve your problem you need, first to do the insert for the issues table. Then retrieve from this table the highest index and use it to populate the record to be inserted into the issue desc table. And do all three actions inside a unique transaction, to ensure that no other user, concurrent insert in the issues table, harms your transaction.
Hope this helps
Loop on a for each list view item on the list view, create an oledb command to insert the text of the list view subitem 0 (first column) into the underlaying table in the oledb database.
Hope this helps
If a data table is the data source for the first combo, the selected item is a data row of the source data table.
Is another data table is the source for the second combo, to change the contents of second combo box, you need to set the data source to a new data table view that will use the info, from the selected item in the first combo, to filter the data in the second data table. Then refresh the second combo to show the new info.
Linq can be used to manually loan data into the second combo, but, IMO, using a data table view is more understandable and, depending on the size, even faster.
Hope this helps
Try this
CampNotes = N'" & rtbCampNotes.Rtf.Replace("'","''") &
The Rtf property contains the source for formatting the text. The Replace ("'","''") will prevent SQL injection if any "'" exists in the text.
Hope this helps.
Specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code.
Did you tryed to change the search path inthe destination machine to point also to the directory where those dll are placed? (CMD -> SET)
Did you tryed to set the installer to register the DLLs in the GAC?
Hope this helps
Use F10 or F11 to run step by step (step through / step in).
Also you can set 'break points' selecting the line to stop executing and pressing F9. From this point you can go step by step by F11 or resume the execution by F5.
Watch the Debug options.
Hope this helps
Tx for the feedback. Please be so kind to mark this thread as solved.
The only way I know is to create a disk driver (like antivirus do) accepting the calls to disk.
Maybe you can start here
Hope this helps
Please, let us know if this solved your problem or found a better solution.
Thanks in advance
Sorry, you need to force the type of curRow:
foreach (DataGridViewRow curRow in dataGridView1.Rows)
(VS2010 / .NET 4.0 Client)
Hope this helps
I woud suggest you to split the sentence.
1) declare the delegate at class level
delegate void UpdateColumnDelegate(object stateInformation, int cid, int status)
2) instad of
if (InvokeRequired){Invoke(new Action(() => UpdateColumn(stateInformation, cid, status)));}
try this untested code
if (InvokeRequired){ var TheDelegate = new UpdateColumnDelegate
(UpdateColumn); object[] params = {stateInformation, cid, status}; {Invoke(TheDelegate, params); }....
This way you can verify step by step what is ongoing. Then see what is happening.
Hope this helps.
Try som thing like
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string dateWorked = dataGridView1.Rows[dataGridView1.SelectedRows[0].Index].Cells[dateWorkedCell].Value.ToString();
int workedHours = 0;
foreach( var curRow in dataGridView1.rows)
{
if (curRow.Cells[dateWorkedCell].Value.TosString()==dateWorked)
workedHours += (int) curRow.Cells[dateWorkedCell].Value;
}
workedHoursLbl.Text = workedHours.Tostring();
}
This code has not been tested.
Hope this helps
The () => UpdateColumn(stateInformation, cid, status) uses a lambda expression to create a delegate signature for your UpdateColumn void function, but does not 'passes' the parameters to it when invoked.
Probably you need to change your sentence to some thing like:
Invoke(new Action(() => UpdateColumn(stateInformation, cid, status)), new object[] {stateInformation, cid, status});
Hope this helps
Navigate to the base registry key HKEY_LOCAL_MACHINE and subkey SOFTWARE/Classes using the Sysytem.Windows.Forms.Application.CommonAppDataregistry (OpenBaseKey/OpenSubkey) or the Microsoft.Win32.Registry.Localmachine OpenSubKey.
For each existing version you will find a subkey like Access.Application.x (where x means the version number: 12 => 2007)
If the version was installed, you should find a subkey like /shell/open/command having a default value pointing to the executable path for the version.
Hope this helps
If your network is Active Drectory based, you can 'publish' your printers into the active directory, then navigating the AD you can find all printers published.
If the resource file is in the executing folder, you can set the basename to the name of the resource file (without the extension) and use the EntryAssemly intead of the Executing one.
Hothe this helps.