Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Walid
  • Order by date
  1. Walid

    How to restrict a code from running in the production environment?

    Thanks for the reply. This is what I thought of, originally. But I am looking for more generic way without the code itself being aware of the conditional execution. One of these architectural wows we get here some times. Walid Magd (MCP) The primary challenge of every software development...
  2. Walid

    How to restrict a code from running in the production environment?

    Hi, I am trying to find an elegant way to check, in the beginning of a sproc, if I am in production environment. In which case, I will prevent the code from running. This is suppose to be the last level of protection, of course we will be careful and try to check for this in so many different...
  3. Walid

    Calling Inherited Method

    You did not specify an access modifier for the methods (i.e. private, public or protected) so they are by default “private”. That is way you can’t access then using a reference to the class. Add the key word public in the front of each method and you will be fine Walid Magd (MCP) The primary...
  4. Walid

    Windows service

    Please explain Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity. -Grady Booch
  5. Walid

    Windows service

    Try this Write a batch file with the commands you want to execute and modify your code to execute this batch file instead. Only one line of code need to be modified for this test System.Diagnostics.ProcessStartInfo sinf = new System.Diagnostics.ProcessStartInfo("cmd", @"/c C:\myBat"); Hope...
  6. Walid

    String vs string

    The intrinsic data types in C# are no more than aliases for structures and classes defined in the System namespace. So, string is an alias for System.String and the compiler will resolve it for you as such. If you so choose, feel free to declare your built-in data types using their real name as...
  7. Walid

    Excel (Driving me crazy)

    You are very welcome. I am gald you got it to work and I respect your persistance. Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity. -Grady Booch
  8. Walid

    C# Capabilities

    Do you the interaction to take place using an application you will develop or a web browser or both? Please explain the problem in more details. Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential...
  9. Walid

    Excel (Driving me crazy)

    Hey man, Setting the value of a Cell is very simple task oSheet.Cells[1, "A"] = 2; oSheet.Cells[1, 1] = 2; Why you get the same 2 for every row, I simply don’t know but you can set a break point and see exactly what is the range object contains in each iteration. It works fine in this sample...
  10. Walid

    Connecting to a SQL server on another computer

    In that case you don’t need to worry about security; you still can use the integrated security and windows authentication. Just provide the server name \\ServerName instead of (local) in the connection string and you will be fine. Most likely that the configuration of the LAN allows SQL-Server...
  11. Walid

    Connecting to a SQL server on another computer

    Is this another computer located in the same LAN? or you want to connect through the internet? Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity. -Grady Booch
  12. Walid

    Best practice with constants

    In C#, there is no global data, every thing need to be in types. Even if you store these values in an app settings file, XML file or even a plain text file, it will still be your responsibility to extract these values from wherever and assign them to the symbols in your code, the media you used...
  13. Walid

    ASPNET account needs access to a database

    Use these commands while the database you want to grant access to is selected sp_grantlogin 'YourMachineName\ASPNET' sp_grantdbaccess 'YourMachineName\ASPNET' Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of...
  14. Walid

    Moving C# Program to another computer

    Not the whole framework, if your intention is just to run the application on this machine you will have no need for the compiles and tools in the SDK. You need only the redistributable part of the framework. Google “.NET Distributable” it will take you to the page in Microsoft web site. In there...
  15. Walid

    How to sum a text col. containing numeric data (numbers)

    Hi, try this code, please change x2 to your table name and do the same for columns names. SELECT Product, SUM(CONVERT(INT,quantity)) FROM x2 GROUP BY Product ORDER BY Product good luck Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of...
  16. Walid

    Null reference exception when trying to use DataAdapter Update

    The object that is null, I think, is the UpdateCommand in odbcDataAdapter.UpdateCommand.Transaction = odbcConnection.BeginTransaction(); The last line of code in the code that sets the Insert command is tapeLogAdapter.InsertCommand = tapeLogInsert; This sets the InsertCommand to an...
  17. Walid

    rounding a number

    SELECT STR(ROUND(1.05838784,2),10,2) Adjust 10 or calculate it using the length of the integral part. Read the help for more info. Good luck Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity...
  18. Walid

    Question about NQC - (not quite c) - LEGO

    First of all you need to know how are your sensors communicate with your processor. Are they memory mapped, meaning they are assigned an address in the address space or they are assigned to a port. In the first case, you will initialize a pointer with the address and write and read to the...
  19. Walid

    rounding a number

    There is a function and it is called – surprise – ROUND() SELECT ROUND(1.05838784,2) will give you what you want Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity. -Grady Booch
  20. Walid

    GOTO bad bad bad

    No, it is because it tends to teach you how to write spaghetti code and make the maintenance and improvements to this code a pure nightmare. Walid Magd (MCP) The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity...

Part and Inventory Search

Back
Top