Friday, August 22, 2008

Ikusa Otome Valkyrie Watch

is installed on a computer

I'm trying to create a simple script on Asp.net, emulating the simplicity of WordPress, to install a web application on any computer.

As I'm using SQL Server as database, I need before installing the application schema in SQL server, verify that SQL Server is installed on your computer.

Windows 2000 and later (XP, 2003, etc.) brings in the WMI core which allows the review, and action, about windows services.

A very useful tool for WMI Code Creator that is available from Microsoft, which I helped create the consultation to discover the team's services. No more roll

code:

 
Imports System Imports
  System.Management Private Function    isServerInstalled (ByVal    servername As String   )  As Boolean    


   
  Try Dim searcher     As New  ManagementObjectSearcher (_  
                   "root\CIMV2"  , _ 
                   "SELECT * FROM Win32_Service WHERE Name = '"   & servername.ToUpper &   "'"  ) 
               If   searcher.  Get  .Count = 0   Then   
                   Return     False   
               End     If   
   
               For     Each   queryObj   As   ManagementObject   In   searcher.  Get  () 
                   If   queryObj(   "Name"  ).ToString.Equals(servername.ToUpper)   Then   
                       Return     True   
                   Else   
                       Return     False   
                   End     If   
               Next   
           Catch   err   As   ManagementException 
               Return     False   
           End     Try   
       End   Function 

and for use within the page:




   Protected   Sub Page_Load (ByVal    sender As Object   ,  ByVal e    As System.EventArgs) Handles    I . 
  Load If Not    (isServerInstalled ( "MSSQLSERVER" ) OrElse   isServerInstalled ( "MSSQL $ SQLEXPRESS" )) Then   
            Response.Redirect(  "nosqlserver.aspx"  ) 
           End     If   
       End     Sub   

Ready!

Thursday, August 14, 2008

Soccercamps In Brasil

function to execute a stored procedure

Continuing a bit with SQL Server and stored procedures previous post, now I leave a small function that allows you to receive as parameters a string of text for the procedure name and a hashtable object to the parameters.

The idea is that this function saved as a method within a class to the project we're doing.

Currently this class now has methods to get a datareader, a scalar, a consulting non-query, etc.. Now the idea is to accept stored procedures. Public

     ExecuteStoreProcedure Function (ByVal   spname  As    String, ByVal    As  Hashtable params)   As SqlDataReader If 
   connString.State = ConnectionState.Closed  Then  
 connString.Open () 
    End If  
           Dim   cmd   As     New   SqlCommand(spname, connString) 
         cmd.CommandType = CommandType.StoredProcedure 
           For     Each   param   As   DictionaryEntry   In   params 
             cmd.Parameters.AddWithValue(param.Key, param.Value) 
           Next   
   
           Return   cmd.ExecuteReader 
       End     Function     'ExecuteDataSet   


In this way we create an object class by:


   Dim db As    New  
AccessDatabase
   Dim As  SqlClient.SqlDataReader oreades  
   hashParams  Dim As New  Hashtable   
 hashParams.Add ( "@ page" , 3) 
 hashParams.Add ( @ pagesize ", 50) 
 oreades = db.ExecuteStoreProcedure (" usp_getdestiniesbypage "   , hashParams) 


If you want you can put a grid on our website and link directly to the DataReader.

 GridView1.DataSource = oreades 
 GridView1.DataBind () 

Listo!

I'm generally

How To Prepare A Flaking Ceiling For Painting

Technological Seminar Notes 2008 in Veracruz

placing a series of notes in the booklets given to these events, but this time, all we get to point the direction of the blog was Oscar Correas ( http://ocorreas.spaces.live.com ), who was the speaker of the first part of SQL 2008. And some questions I asked him to himself. Of which I liked, what were the answers. Honestly

many things were new to me, or at least because they do not use. The security scheme and maintenance plan sounds tremendous. So also the issue of reporting to perform services without the need for IIS. This can be practical because in Vista Home IIS7 is not installed. Extensive knowledge of the second display hand, damn I wanted to take a course with him. Not attend the event in Vista, because unlike many people, I use, works well, and do not want to complicate. Especially now, I have to manage many computers. I hope to start using SQL 2008 as soon as possible.

But on this occasion, my notes are rather efocadas the event itself, and not so much new that brings the product. Input as well mention the exhibitors, Oscar and Miguel Angel Garcia of Compueducacion ( http://www.compueducacion.com.mx ) were simply and concisely the new features of the product. The trouble, as the little publicity given the event the Microsoft. The previous event was about 60-70 people, ASSISTED out there now only 10. Ask the people of Microsoft, and nobody came with them actually works Oscar bside a MS partner, boy or even Humberto Aguirre is located in Veracruz, he spent the whole event came and went. Some participants happy because they took a package of booklets or feathers at the end gifts as well as books, that just because they were not development tools or servers, I started to fight them. : D

I hope the low turnout does not cause a sudden inability to come to give these talks.

Ready!

pd. Oscar Correas and I were promptly let the event was very crappy blogit.ms ... what a coincidence the winner of one day to another was like 800 votes ... mmmm

Friday, August 1, 2008

Silver Eagle By Mcculloch

Calculate fee payment receipt online

Sometimes I have to give receipts for fees for any work done. So I have an excel file for this. With the migration to my new laptop, I find the CD which support the file appears when least expected.

I think it was appropriate to have the excel file, Google Apps or something. Not long ago I read in the magazine Software Guru, concerning a case in which Zoho be achieved through a small application that worked as a webservice.

I found interesting to place the issue of a webservice for the calculation, actually does not take much and it would put it in practical applications. Just as I am devising a complete application for billing (message for Robert and SICFE.Net). Search

Zoho, and after a short battle with my username and password, my first experience putting "Application" with Zoho Creator.

At first I did not understand very well when I was programming, I thought for a moment that was javascript, but it is something different, a sort of JSON, is not. Different.

The environment is very friendly, they understand the language and after 30-40 minutes, I have the result:

http://creator.zoho.com/vgarcias21/form/1/

The result is not entirely a Web service, but it works pretty well and is what I was looking to do. The script code is as follows:



 Recibo_de_Honorario 
 form {
  displayname = "Receipt of Honorary  
 Cantidad_a_recibir 
 (
  displayname =" Amount receive "type =  
 MXN 
 
 width = 20) 
 
 Monto_en_recibo 
 (
 
 type = formula value = (Cantidad_a_recibir / 0.95)   
     )  
   
     IVA_15  
     (  
         type = formula  
         value = (Cantidad_a_recibir / 0.95 * 0.15)  
     )  
   
     Valor_total  
     (  
         type = formula  
         value = (Cantidad_a_recibir / 0.95 * 1.15)  
     )  
   
     Ret_10_ISR  
     (  
         type = formula  
         value = (Cantidad_a_recibir / 0.95 * 0.1)  
     )  
   
     Ret_10_IVA  
     (  
     
 type = formula value = (Cantidad_a_recibir / 0.95 * 0.1) 
) 
 
 Valor_neto 
 (
 
 type = formula value = (Cantidad_a_recibir / 0.95 * 1.15 - Cantidad_a_recibir / 0.95 * 0.2) 
) 
 
 
 plain (type = plaintext 
 
  value = "< DIV > See id = ted the result of: < A href = \\" http://creator. zoho.com/vgarcias21/view/1 / /% 22 > http://creator.zoho.com/vgarcias21/view/1/< / A > < / div > " 
) 
 
 

} Ready!

Quit Smoking Joint Pain

IT Pros and MS Community Innovation Tour 2008 in Veracruz

The community of IT Pros Mexico is inviting a few seminars to be conducted on Windows Vista and Microsoft SQL , will be held in different cities of the republic, and between them will include Veracruz, on Tuesday, August 12, 2008.

addition next August 27, 2008 walk here as Microsoft with some interesting topics:

10:00 to 11:00 Business Technology Preview
11:00 to 12:00 Business Acceleration
12:00 to 12:30 Break (Coffee, Cookies) - 30 people
12:30 to 13:30 Microsoft Business Programs
13:30 to 15:00 Networking Technology Track

15:00 to 16:00 Enterprise 2.0 Blogs, Wikis, Mashups, RSS, social networking ideas banks, have become one of the best methods for unstructured information sharing within organizations, learn how to integrate this information with structured data for organizations to streamline and improve business processes. OBA and Sharepoint
16:00 to 17:00 Harnessing the power of Windows. Windows Presentation Foundation, Workflow Foundation, Communication Foundation, are major advances that the framework has to application development. Learn how to build highly reliable applications, high performance, and the considerations that you should have about Windows Vista compatibility
17:00 to 17:30
Break 17:30 to 18:30 Web 2.0 and Data Services. The integration of Internet services that Windows Live offers allow us to create the next generation of interactive applications in conjunction with the power of Visual Studio and the new features of SQL 2008 discover the new possibilities that have
18:30 to 19:30 Interoperability MySQL, PHP, SQL Express, there are many investments that have been made in these technologies. Discovering and get the most from these developments and how to get the best of these worlds.
19:30 to 20:00 Enthusiasts Talk

keen to see what I have to PHP, sure to make the comparison of SQL Express and MySQL. I hope this interesting.

Apparently the event will be held at the Fiesta Americana. I have not yet seen the registration form for the event all the information is publishing the Jaime Sanchez , the funny thing is that apparently does not have a page on the Microsoft site. The information has been released for Facebook, Hi5 and MSDN Blogs. It seems they want the news of the event is a viral therefore, not so formal.

Ready!