Volksman's Q&A profile
Visual FoxPro sqlstringconnect
Hi All, I'm trying to connect a database using sqlstringconnect function. If the connection is successful it returns a connection handle. Here is my problem: If it cannot make the connection, it opens the ODBC connection dialog box. I don't want it to show the dialog box. Just want to get the error code (-1). I'm using VFP 8.0 on Windows 2K. My Code: =SQLDISCONNECT(0) && close all connections lcConnectionStr ="DRIVER={MySQL ODBC 3.51 Driver};SERVER=myServer;DATABASE=myDB;UID=myID;PASSWORD=myPW;OPTION=3;" TRY lnConnHandle = SQLSTRINGCONNECT(lcConnectionStr) && Connect catch lnConnHandle = -1 ENDTRY =SQLDISCONNECT(0) && close all connections Thank you very much in advance ...Show All
Visual C++ Text display problem with a CRichEditCtrl object
Hi, I mounted a CRichEditCtrl editor object on the View frame of a MDI structure and used its member function SetWindowText to display a CAtlString string (m_logText, shown as in the following code segment) in it. The code works perfectly with the Debug build of the program, but won't work with the Release build. Please help figure out a solution. Thanks. CAtlString m_logText; void CiSenseAutoMappingView::paintLogText() { m_showLogText = true ; m_richEditor.SetWindowText(m_logText); m_richEditor.SetModify(FALSE); Invalidate(); } int CiSenseAutoMappingView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) return -1; CClientDC dc( this ); CRect rect; ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GSE download numbers?
Can any download numbers be given out on XNA Game Studio Express I am wondering on how big the community might be. By "the numbers keep changing", I mean, "the numbers go up by the hour, sometimes quickly, sometimes slowly...depends on time of the day" ...Show All
Smart Device Development Changing system clock
Is it possible to change the system clock on windows CE from within a native C++ application If so, how is it done Sure. Please call SetSystemTime() to do that. http://msdn.microsoft.com/library/default.asp url=/library/en-us/wcecoreos5/html/wce50lrfSetSystemTime.asp ...Show All
SQL Server Handling errors in SSIS
When I have an alternet Data Flow in an event handler, caused by a record failing to be inserted due to a unique-key constraint violation, does this increment the number of errors, counting towards the MaximumErrorCount How can I NOT count it as an error The thing is, I need to insert 300,000+ records each day, and some may be duplicates from data already in the table. So I set a unique key constraint on the table, and if during the load, it fails, it will trigger an alernate data flow to load the error records into another table. But if someone tries to load a file that already has been loaded, for example, all the records would be duplicates, which would be equivelant to 300,000+ errors, and I don't want to keep setting the MaximumEr ...Show All
Smart Device Development Microsoft.WindowsMobile.Status
I need to use a SystemState object the get incoming call state, my codes just like below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.WindowsMobile.Status; //the line not pass build namespace BlackList { public partial class Form1 : Form { SystemState state; // defined globally to class public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } } } but them could not pass the building. The vs 2005 tell me that there are not WindowsMobile in namespace Microsoft. how to ref the WindowsMobile Thank you. ...Show All
SQL Server FTP Task - File represented by _does not exist.
I've done some searcing on this forum and online. I found one thread that talked about this problem, but it didn't seem to help me at all. I have a package that downloads an xml file from a ftp server for processing. The file is named after the day that it was put on the ftp server. So, to help the situation I created a variable that gets set to the proper name before the FTP Task fires. Now, I've been working with this SSIS task for just over 2 months and haven't seen this issue ONCE until I deployed it on the production helper server. All of my other SSIS tasks are working fine in my other Tasks. I have set DelayValidation to true for the FTP Task, I have moved around the time the task gets run. This is what is really tricky. If I fire ...Show All
Visual C++ why always show "Windows has triggered a breakpoint in mmc.exe"?
I am programming with mmc snapin and have implemented a extension propertysheet for service snapin. In vs 2005, ATL project was built up and IExtendPropertySheet is implemented. At CreatePropertyPages procdure, I can tell which service is selected. but when snapin dialog is closed, mmc is always showing "Windows has triggered a breakpoint in mmc.exe". I don't know where codes went wrong. But if MMC.exe is runging directly, no error dialog is shown whether debug or release could you tell me where codes were ignored thang you . ...Show All
Visual C++ How to write a UTF8 Unicode file with Byte Order Marks in C/C++
What is the correct way to write utf8 byte order markers (BOM) to a UTF file with WriteFile I tried this... TCHAR* sbuffer = TEXT("Some text in a utf8 file"); char * smarker = ( char *) malloc(4); smarker[0] = 0xEF; smarker[1] = 0xBB; smarker[2] = 0xBF; smarker[3] = 0x00; WriteFile(hFile, smarker, 3, &dwBytesWritten, NULL); // write the bom free(smarker); WriteFile(hFile, sbuffer, (_tcslen(sbuffer) + 1) * sizeof (TCHAR), &dwBytesWritten, NULL); // write the data + null When the file opens in notepad the BOM does not display (good), but each character has a space showing after it. ie.. "S o m e T e x t ...." My original need ...Show All
Visual Studio Express Editions How can I detect if my application was already running?
In visual basic 6 I used If App.PrevInstance = True Then End EndIf Ho can I do this in Visual Basic Express 2005 Yes, that should work.... When I try it I get an 'An attempt was made to acces protected memory' error. I only get this, however, when I try catching the events in the application events section. There is a StartupNextInstance event there, but if I put anything in there I get an error. Has anyone else had this problem Surely there is a way to detect on startup if your application is already running and just teminate. I like the idea of being notified however, it means I could give focus to my application, or restore it from the system tray if I have i ...Show All
Visual Basic DateTimePicker Question.
Hello. A question, please. How can I clear a datetimepicker in execution time I'd want to show spaces. Thanks... Ok well if you want to make a datetimepicker control display nothing change the Format property to Custom and the CustomFormat property to " " (Blank wont work because it will revert to the default Short Date thingy) ...Show All
Windows Forms bindingcontext.addnew then set combo.selectedindex will not work
I have a form that is used to enter data. One of the controls is a combobox using complex binding. I have a button that calls a bindingcontext.addnew. After this call I can not set the combobox no matter what I've tried. I've tried selecteditem, selectedindex, text, selectedtext, ect... I've tried getting a datarowview from the bindingcontext.current. This will allow me to set the value in the table, but that value is not displayed in the combobox unless I end the edit. I don't want to end the edit because I want them to be able to change their mind and cancel the new record. This is the binding for the combobox: Me .cboCompletedBy.DataBindings.Add( New System.Windows.Forms.Binding("SelectedValue", Me .DSnonconforming1, & ...Show All
Audio and Video Development HD DVD Writers
Are there any HD DVD Writers on the market I am looking for a PC drive. Internal or external doesn't matter. Money also doesn't matter because I am working for a company that deals with these things so they will pay for it. Hopefully ;-) I just didn't find any HD-DVD drive in contrast to Blu-Ray for which are several writers on the market. Do you know an internet url for this Toshiba writer ...Show All
.NET Development Assembly Minimum Requirements
Hi, Using VS 2005 Pro., I have built a Class Library (DLL) with several functions, subs, etc... I would like to determine the minimum security requirements. For some reason, the "Security" tab does NOT appear when designing Class Libraries (DLL's), therefore, I cannot use the "Calculate Permissions" button. I tried using PERMCALC.exe, but the resulting .XML file is quite involved and hard to decipher. It has many "demands" nodes throughout and thus extremely time consuming to go through. Is there any way quickly determine .DLL security permission requirements (minimum), or somehow "attach" the XML file generated by PERMCALC.exe to the assembly/DLL in question There must be an easier way than go ...Show All
.NET Development How can i create a G-L-O-B-A-L hook in c#?
Hello, I am trying to use the win32 api SetWindowsHookEx in order to register a global hook of type CALLWNDPROC . The following code stucks my computer... what am i doing wrong How can i create a G-L-O-B-A-L hook in c# using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; using System.Runtime.InteropServices; namespace FlatMenuForm { public class Base : Form { private System.ComponentModel.Container components = null; [DllImport("User32.dll",CharSet = CharSet.Auto)] public static extern IntPtr SetWindowsHookEx(int type, HookProc hook, IntPtr instance, int threadID); [DllImport("User32", CharSet=CharSet.Auto)] privat ...Show All
