Thank you
mcgahanfl
Posts
-
How do I bookmark code? -
How do I bookmark code?In visual c++ the keys ctrl-f2 puts a little blue bookmark next to the current line of code. To return to this code a person just uses the f2 key. How can I book mark code in the .net editor? thanks;)
-
using dbf in c# .netI think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com
-
using dbf in c# .netI think your dbf might contain a blob or general field. The data adapter can not handle the potential data. (da limit of 8000 or so, when blob could be 4 gig). If you want to send me your dbf, I will send you a code snippet that can read it. With all respect to the prior post, if your reading a FoxPro table AND it has one or more indexes you should not use a dbase driver. Also the dbase driver will truncate the blob masking the problem. pmcgahan@hteinc.com mcgahanfl@hteinc.com
-
foxpro general field type and c# byte[]//The problem is that bytes written to a FoxPro General Field are not being read back in correctly. //This code will write 10 bytes to a general field and then read them back in. When the data is read back it will be incorrect. //Part 1 of 2. Write a byte[] with values 0..9 to a foxpro 'General Field' OleDbConnection oleDbConnection = new OleDbConnection(@"Provider=VFPOLEDB.1;Data Source=c:\blobTest\"); oleDbConnection.Open(); byte[] adtByte = new byte[10]; for(Int16 i = 0; i < 10; i++)//load the array with values 0,1,2,3,4,5,6,7,8,9 adtByte[i] = (byte)i; OleDbCommand command = oleDbConnection.CreateCommand(); command.CommandText = "DELETE FROM image"; //clean up past attempts command.ExecuteNonQuery(); command.CommandText = "INSERT INTO image (image_len, image_val) VALUES (?, ?)"; //foxpro table 'image' has two fields. image_len of type interger and image_val of type general. OleDbParameter p1 = new OleDbParameter("?", OleDbType.Integer); p1.Value = adtByte.Length; command.Parameters.Add(p1); OleDbParameter p2 = new OleDbParameter("?", OleDbType.Binary); p2.Value = adtByte; //write the byte array as type binary - I think this is my problem???? command.Parameters.Add(p2); command.ExecuteNonQuery(); command.Dispose(); //At this point we should have one row in the table and the values should be; // image_len = 10 // image_value = 0123456789 //-------------------------------------------------------------- //Part 2 of 2. Read the row just created back into a pair of variables. OleDbCommand oleDbCommand = new OleDbCommand("Select * from image", oleDbConnection); OleDbDataReader oleDbReader = oleDbCommand.ExecuteReader(); while (oleDbReader.Read()) { object objFieldImage = oleDbReader["image_val"]; byte[] inBytes = (byte[])objFieldImage; object objFieldLen = oleDbReader["image_len"]; int iLen = Convert.ToInt32(objFieldLen); //At this point image_len is 10 as expected. //but inBytes has doubled in size and the value is all wrong. } thanks:^)
-
How to pass a parm to iexplorer?Can the internet explore be called from a command line and be passed a xml file to display? Example: C:\Program Files\Internet Explorer\IEXPLORE.EXE /C:\temp\test.xml thanks
-
CString format and numbersDon't I feel silly. Thank you.
-
CString format and numbersIs there a straight forward way to make a number like 123 and turn it into a string with left padded zeros. Example "123" into 0000123 A way that does not require a silly loop like this. CString strSecId; strSecId.Format("%d", m_iSectionId); while(strSecId.GetLength() < 7) strSecId = "0" + strSecId; //left pad with zeros thanks
-
XML as input to a print engine.Can you name a commercially available tool for XML-FO printing and forms design? I see different offerings on the Web, such as Crane Softwrights Ltd, but I was hoping for a word-of-mouth endorsement from somebody. thanks
-
AfxIsValidString does not seem to work.thank you, that is a reasonable explanation
-
AfxIsValidString does not seem to work.Thank you for your reply. The -1 parm looks for NULL terminated, otherwise it is documnented that it verifies the length. In any event, there is no test set of data that will fail this test other than a NULL pointer.
-
AfxIsValidString does not seem to work.Thank you for verifing what seems reasonable.
-
AfxIsValidString does not seem to work.Thank you for your effort.
-
AfxIsValidString does not seem to work.char szDescription[200]; BOOL bValid; bValid= AfxIsValidString(szDescription, 400); //bValid is TRUE, shouldn't it be FALSE?????????/ thanks
-
How tof find the executable name?Thank you
-
How tof find the executable name?Thank you
-
How tof find the executable name?Assume note pad is running. The API EnumWindows will return the window title such as "Untitled - Notepad". I am looking for an API that will tell me "notepad.exe" is running. In short I am looking for the same information the task manager displays. thanks
-
Closing an application.Thank you. I very much appreciate the background information.
-
Closing an application.Thank you. This is good information.
-
Closing an application.Thank you. That worked nicely.