1 Nov, 2008 in Gadgets, Programming, Sports by Mr. X


The Wii Fit might have some competition brewing, if Men’s Fitness magazine is a publication worthy of the public’s trust, that is. The details are vague, to say the very least but, here’s what we “know”: Dave Kushner, executive producer at EA Sports, told the magazine that the company is planning an ‘unnamed fitness game’ with a ‘new peripheral’ which will connect the Wiimote to the player’s body, enabling all sorts of newfangled measurements, movements, and exercises barely dreamed of before. Sounds totally awesome, right? Well, if and when it materializes, we’ll be sure to rush to the store, buy one, then sadly rue its unused, guilt-inducing existence every day thereafter.

12 Aug, 2008 in Programming, Softwares by Mr. X

Yesterday On 11 Aug 2008 Microsoft Released Visual Studio 2008 SP1 And .Net 3.5 SP1
By Launching Service Pack 1 For Both VS And .Net 3.5 Microsoft Provided A Big Relief To Developers As SP1 Contains Many Of The Bugs Fixed And Many New Features Also Added.
Visual Studio 2008 SP1 Delivers:

  • Improved WPF Designers
  • SQL Server 2008 Support
  • ADO.NET Entity Designer
  • Visual Basic And Visual C++ Components And Tools (Including An MFC-Based Office 2007 Style ‘Ribbon’)
  • Visual Studio Team System Team Foundation Server (TFS) Addresses Customer Feedback On Version Control Usability And Performance, Email Integration With Work Item Tracking And Full Support For Hosting On SQL Server 2008
  • Richer Javascript Support, Enhanced AJAX And Data Tools, And Web Site Deployment Improvements

The .NET Framework 3.5 SP1 Delivers:

  • Performance Increases Between 20-45% For WPF-Based Applications – Without Having To Change Any Code
  • WCF Improvements That Give Developers More Control Over The Way They Access Data And Services
  • Streamlined Installation Experience For Client Applications
  • Improvements In The Area Of Data Platform, Such As The ADO.NET Entity Framework, ADO.NET Data Services And Support For SQL Server 2008’s New Features

Additional Features

  • Support for using SQL Server 2008 with Team Foundation Server.
  • And Many More.

You Guys Can Download It From download VS 2008 SP1 and .Net Framework 3.5 SP1

Hi

Does any body know how to open a dll file. I can create a DLL file in VB6 but dont know how to reopen the code applied in it.

Have any one of you tried to use Single Quote () while doing database handling. Well if you try to save any string that contain a (), it will show a syntax error in your query. I had tried such a thing in ADODB Connectivity while working in VB 6.

Now the question arises,

What to do?

How to go further?

what is the solution?

The solution for the above problem is very simple. Use the function given below in your applcation & just pass your string through this function before assigning it to your SQL queryfor the ADODB Connection (or any other).

 

‘——————————————————————————

Public Function ReplaceToDb(ByVal strng As String)
    ReplaceToDb = Replace(strng, ““, ““)

 ’ Convert to

 ’ These are 2 Single Quotes, Not a Double Quote

‘ If i read it in words, it says

‘  ReplaceToDb Equalto Replace Bracket Open strng  Comma Double Qoute Single Qoute Double Qoute Comma Double Qoute Single Qoute Single Qoute Double Qoute Bracket Close 
End Function

‘——————————————————————————

.

..

….

Confused ?…….

look at the following example

Consider a synario of Change Password Module where you need to Change your current password

Change Password

Change Password

 

Dim dbCon as new ADODB.Connection

Public Function ReplaceToDb(ByVal strng As String)
        ReplaceToDb = Replace(strng, “‘”, “””)
End Function

Public Sub databaseConnect()
Dim dbSource As String
dbSource = App.Path & “\dummy.mdb”

    With dbCon
        .Provider = “Microsoft.Jet.OLEDB.4.0″
        .CursorLocation = adUseClient
        .Open dbSource
    End With

End Sub
Private Sub cmdOK_Click()
On Error GoTo ErrorLog
Dim recSet As New ADODB.Recordset
Dim strRecSet, UserID as String

    databaseConnect
    UserID = “Divyansh”
    strRecSet = “Select Pass from tblUsers Where UserID = ‘” & ReplaceToDb(UserID) & “‘;”
    recSet.CursorLocation = adUseClient
    recSet.Open strRecSet, dbCon, adOpenDynamic, adLockPessimistic

    If txtPass.Text = recSet!Pass Then
        If txtNewPass.Text <> “” Then
            If txtNewPass.Text = txtCPass.Text Then
                strRecSet = “Update tblUsers Set Pass = ‘” _
                            & ReplaceToDb(txtNewPass.Text) & “‘ Where UserID = ‘” & ReplaceToDb(UserID) & “‘;”
                dbCon.Execute (strRecSet)
                MsgBox “Password Changes Successfully”
                Unload Me
            Else
                MsgBox “Password Confirmation does not matches”
                txtNewPass.Text = “”
                txtCPass.Text = “”
                txtNewPass.SetFocus
            End If
        Else
            MsgBox “Password Cannot be left Blank”
            ClearText
            txtNewPass.SetFocus
        End If
    Else
        MsgBox “Please Check Your Password”
        ClearText
        txtPass.Text = “”
        txtPass.SetFocus
    End If
End Sub

Sub ClearText()
    txtNewPass.Text = “”
    txtCPass.Text = “”
End Sub

‘——————————————————————————-

where DbCon is the Connection & RecSet is a Recordset.

Hope this works.

Try it…………..