Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

mcljava

@mcljava
About
Posts
70
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Simple question about header files
    M mcljava

    Fundamental to the header files is the preprocessor. In order to avoid Multi-Inclusion you need a to tell the preprocessor to only include the header under certain conditions. For example, file1.h #ifndef __FILE_1_H__ #define __FILE_1_H__ ... #endif Now with that said, you probably need to revisit your header file design because you should not have a situation where File1 is including File2 and visa versa. If there is common definitions or structures, put those in a separate header. Keep the module specific data in the header that applies to the .CPP or .C module. You application might then look like: file1.h #include "File1.h" #include "CommonData.h" ... file2.h would be similar. Good Luck Mike Luster CTI/IVR/Telephony SME

    Managed C++/CLI question

  • Microsoft Office Spreadsheet 10.0
    M mcljava

    Two choices: Excel Object Model or OLE DB. Depending on what type of dataset manipulation you need to do, that should drive your choice. The Excel Object Model allows closer interaction with Excel whereas OLE DB is more abstract. Search for examples of both and decide what suits your application better.g Mike Luster CTI/IVR/Telephony SME

    C# tutorial

  • converting mysql to sql server script
    M mcljava

    I just went through this exercise myself - a but of discovery plus trial and error. If you are used to the way MySQL works then you'll find SQL Server a different because most of the manual things we do in MySql like create databases and tables is done through graphical tools. One hot tip is the closest thing to writing SQL procedures like you do for MySQL is using iSQLW. You can enter SQL there but the syntax is slighty different. For creating tables, the EnterpriseManager is the primary tool you use to create the database and design the table(s). Although with the proper privilege you can create a database through Visual Studio Server connections - although that's a quick a dirty way. Lastly you need to know about Data Transformation Services (DTS) which is used for all import and exports of data. It has a broad choice of formats but alas no option for MySql option :sigh: Bottom line, if you have a lot of data in MySQL expect to get to know DTS and massaging the data. Good Luck Mike Luster CTI/IVR/Telephony SME

    Database database mysql sql-server sysadmin tools

  • DataAdapter.Update not working
    M mcljava

    Make sure your DataAdapter logic, including TableMappings, Fill, etc are all within a Try/Catch block, the you can print out the Exception.Message to see what is causing the I/O failure. Good Luck Mike Luster CTI/IVR/Telephony SME

    Database database help announcement workspace

  • Need Your Attention this is General!
    M mcljava

    There is definitely more than one way to skin the proverbial cat. My take is create a named data set. The when you fill the adapter you are referring to a table and row such as MyTable.AccountNumber[i] instead of Tables[0].Rows[....] If you have signaficant converion between the dataset and the deseried representation in variables then a custom data set make not fit so well. You might be better off dealing with the generic data set. But again I would rather define an Interface with the constants you need to manage the generic data set. Then you can refer to logical index names instead the hard coded table, row or column names. Finally when should you copy the data set to a private data store? Well if the data set is humongous and you are only using a small portion that has to be converted and used by other .CS classes and modules, then it makes sense. Particularly if If you are copying the data set and using the variables all with one class the need is dubious. It is definitely "overhead" to copy a bunch of variables so if you can find a way to directly operate on the data perhaps via a Named Data Set or through an Interface, then your app can drive directly off the data w/o the intermmediate cyles. Good Luck Mike Luster CTI/IVR/Telephony SME

    C# database question csharp collaboration help

  • Client /Server Programming
    M mcljava

    Developing a client-server program or peer to peer program on a LAN is only the first step. Once you are fully assured your application(s) is/are working then you can proceed to trying to make it work over the Internet. Let's look at the requirements: 1. Internet Connection 2. Some way to identify your public IP address (i.e. the one of the Cable or DSL ISP) 3. A Router Your application will run on your LAN. It has a well known port, lets say it was 5999. Over on the router you will need to configure 5999 under Port Forwarding in order to send public traffic matching that port to the computer on your LAN that is running your application. Meanwhile your friend or colleague needs to know two things to connect: Public IP and port. You can also use this basic technology to setup a FTP Server, Web Server or other common applications (including Remote Desktop) that you wish to remotely access. Ahhh, but lest we not forget the one caveat. If you can see it on the Internet so can people with nefarious purposes. So make sure you have a firewall in place, keep your software behind the DMZ. Good Luck Mike Luster CTI/IVR/Telephony SME

    C# help question sysadmin lounge

  • Nokia 3330
    M mcljava

    The 3330 is a low end, 2G phone with no frills per se. It does not support Java or Bluetooth it definitely rules out C#. About the only thing you could hope to do is read the event stream when you plug in the USB adapter (provided it has one for Outlook synchronization). Even there C# would not be a good choice, you would be working primarily in unmanaged code. What is it you are trying to accomplish anyway? Mike Luster CTI/IVR/Telephony SME

    C# csharp help question

  • Cellphone software
    M mcljava

    First of all you need to contact the Cell Phone manufactuer to determine 1) what requirements and limits are imposed by the architecture, 2) is there a SDK available, 3) does the software you are intending to build already exist, and finally, do you need a license to deploy? Most cell phone vendors as you can imagine would not take kindly to their phone being used as an open development platform. In fact, lets say you jump through the necessary hoops to get started, you almost certianly be required to have your sofware certified to run on the phone os. Deployung an aplication without permission is definitely a legal mistake. Ever take the time to read your cell phone contract? One final note, Java is the preferred development language because of specialized VMs that have been ported to the Motorola chipsets. While Java is not just like C#, the similarities are pretty close in terms of streams, sockets, and event handling. If you are still interested in 3G software, you might start investigating the new Smart Phones touted by Bill Gates. Since the objective is to have Windows CE as the platform you will have an opportunity to do some embedded development for whatever features phone vendors offer in conjunction with the tools Microsoft offers. Mike Luster CTI/IVR/Telephony SME

    C# csharp tools question announcement

  • MySQL 5.0 and SQL Server 2000 on same box
    M mcljava

    Yep, MySQL uses 3306, and MSSQL uses 1433 and 1434 I hear. I'll try reinstalling MySql at the expense of hosing MSSQL, lol Stay tuned. Mike Luster CTI/IVR/Telephony SME

    Database sql-server help database mysql sysadmin

  • Namespace issues
    M mcljava

    In C# you need to make sure you are referencing the right kind of Timers. System.Windows.Forms.Timers and System.Timers provide functionally different classes of timer logic. In terms of the namespace, make sure you choose the one that suits your application. BTW, if it were not for Microsoft... "Basic" in all of its various forms would have died off years ago. Funny how to keep it alive they made it more like C and then C++ like. And now that there is a CLR differences are petty, so choose the language you want but consider history first before attempting to bash C#. Each language has its own merits. Mike Luster CTI/IVR/Telephony SME

    C# help csharp question

  • MySQL 5.0 and SQL Server 2000 on same box
    M mcljava

    I have a slight problem and wondering if someone else has encountered this. Host platform: Windows 2000 Server, SP4 - MySQL Server 5.0.18 was running perfectly. - Added MSSQL 2000 to 2K Server and now MySQL is getting a signal to exit. It is desirable to run both on my server, and access either one as needed. I am thinking someone must have ran into this before and know of any compatibility issues. Thanks for your help! Mike Luster CTI/IVR/Telephony SME

    Database sql-server help database mysql sysadmin

  • How do you import a CSV file into MS SQL?
    M mcljava

    Thanks guys, I used Enterprise Manager and it was pretty simple for importing 37K rows of CSV data. Getting data into your database is easy BUT... when I create a Table Definition importing to that seems to need some extra work. I get the impression I'll have to write a Stored Procedure in TSQL to convert the data into the desired custom Table Format. Recommendations welcome. Mike Luster CTI/IVR/Telephony SME

    Database question database mysql sql-server sysadmin

  • Using Named Pipes with C#??
    M mcljava

    Phil, Fire up google, and ... "C# named pipes" - it will lead you to at least a dozen or so C# Named Pipe Examples. Good Luck Mike Luster CTI/IVR/Telephony SME

    C# csharp c++ visual-studio hardware tools

  • mainframe
    M mcljava

    3270, 5250 Terminal Emulation packages are usually provided by IBM or similar IBM approved suppliers. VT52, VT100 from HP these days. In all cases the undertaking of writing terminal emulation is well beyond the scope of what is possible to discuss here. These days, many mainframes have a TCP/IP session if you are so lucky. Many others have a SQL or DB2 interface, at the end of the day start with your exact requirement and start you search from there. Good Luck Mike Luster CTI/IVR/Telephony SME

    C# question

  • I need a recomendation for a good C# book
    M mcljava

    Hard to say what book to recommend as the texts for C# vary from practical to the ridiculously thick and useless. These days the good ones are all marked as beginner or advanced topics. So unless your "Dad" is trained in computer science you are probably fine with book suited for beginners that has good fundamentals of programming and some simple examples. There is no use explaining a hastable to someone who has no idea what it used for, so use your instincts and pick one that "makes sense". Good Luck Mike Luster CTI/IVR/Telephony SME

    C# csharp css xml question learning

  • How do you import a CSV file into MS SQL?
    M mcljava

    Excuse my lack of knowlege here, I am primarily a MySql user. Importing data in MySQL is a piece of cake in through mysql.exe using the following syntax: LOAD DATA LOCAL INFILE 'filename.csv' INTO TABLE myTable FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; But I now have to switch over to SQL Server. Is there an equivalent SQL Conversational interface like mysql.exe through which I can enter SQL commands? If not, what is the recommended method for importing files? Mike Luster CTI/IVR/Telephony SME

    Database question database mysql sql-server sysadmin

  • C++ guy missing pointers
    M mcljava

    I know your pain, I was experience C/C++ withdrwals too. Here's my take: you don't need any pointers in managed safe code. In system code (i.e. unmanaged you can still use them). Now with that said most applications are more easily maintained and written if they leverage the C# managed classes. You still have Ref and plus a new Qualifier call Out. But instead of operating on addresses, all C# logic is based on arrays and indices. So I could have an 100 item array of int called myList. If I call a funtion called AddTheValues it might look like this: public long AddTheValues( int[] numbers ) { long total = 0; // // note we do not need an int* to operate on numbers // for ( int i=0; i < numbers.Length; ++i ) total += numbers[i]; return total; } Out is sort of like a built in malloc or new that a function returns thru the parameter list instead of as a return value. Good fpr special allocator type code. public void NextValueList( out int[] num, int size ) { num = new int[size]; } Ref is used when like in C++ we are concerned about operating the SAME structure. In C# you normally don'd have to clean up (i.e. free) new'd elements. This is true for the general case. BUT if you have hairy I/O classes then there is a destructor equiavlent called IDisposable. Basically you derive your C# class from this Interface and it provides the Dispose() method you can customize to clean up. Good Luck Mike Luster CTI/IVR/Telephony SME

    C# tutorial question csharp c++ help

  • Using Named Pipes with C#??
    M mcljava

    TCP/IP sent to localhost, uses Named Pipes under the hood I'm told. That's a reasonable swap. Otherwise you have two basic options. If you want to use Named Pipes in C# for a general mechansism then its off to P/Invoke land. But unless you have to interface to an older C/C++ program that used Named Pipes, you might consider leveraging some of C#'s data structures and particularly the TCP classes. Secondly, if you are using SQL Server, Microsoft has carried over Named Pipes for that. That's easy to take advantage of. I guess there is one 3rd option which may or may not make sense. Since you have a heap of code in C++, you could hobble together a C# callable DLL and provide the underlying Named Pipe support. In sum, Named Pipes appear to have been relegated to performance driven 3GL/2GL apps. With some effort you can force an implementation in C# but you have to ask: "why am I doing this?" Good luck Mike Luster CTI/IVR/Telephony SME

    C# csharp c++ visual-studio hardware tools

  • equivalent code
    M mcljava

    Try the SQL/ADO forum for more info. BUT here's what I have done: ODBC - Easy to do in C#, there are tons of article here. Worst part is the DSN as you eithe rhave to manually provision it OR use on of the autmation techniques you find on CodeProject - and trust me when I say there are a few. You can use this with MySQL, or other non Microsoft DBs as opposed to delving into the C based APIs. If your app is running on say Linux this might be a good option. OLE DB - Not really for your relational databases per se, but if you have data stores like Excel or other spreadsheets, or office files, it works great and again pretty easily once you know the finer configuration points. SQLClient - If you are using SQL Server then this is probably the best route because of the inherent support. All of the options Odbc, OleDb, and SqlClient have a similar data model. You should be able to find code here, of course on MSDN, and throughout other sites. Good luck Mike Luster CTI/IVR/Telephony SME

    C# csharp question

  • How to get the Enum item names using Reflection
    M mcljava

    You can also simply do a ToString(). For example: string s = tenumArtMode.arModeManual.ToString(); Would yield the string "artModeManual" Good Luck Mike Luster CTI/IVR/Telephony SME

    C# csharp c++ tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups