Solved

syntax read help

Posted on 2006-11-28
6
317 Views
Last Modified: 2009-07-29
I am reading the code for this vb app and I came across this line..

 stSQL = "{native 'CALL WINS_SET_PARMS CurrentDate=" & cboMonth.Text & "/" & cboDay.Text & "/" & cboYear.Text & "'}"
 RunSQL(stSQL, stConn)


can someone interpret what the native call mean...?
0
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 125 total points
ID: 18031613
>>stSQL = "{native 'CALL WINS_SET_PARMS CurrentDate=" & cboMonth.Text & "/" & cboDay.Text & "/" & cboYear.Text & "'}"

is a sql statement of some sort


 >>RunSQL(stSQL, stConn)

RunSQL is obviously some kind of function that takes two parameters: sql statement and database connection string and then executes sql statement against the database
0
 
LVL 35

Expert Comment

by:YZlat
ID: 18031657
RunSQL could be implemented something like that in VB.NET:


Sub RunSQL(ByVal strConn As String, ByVal query As String)
        Dim conn as SqlConnection

        Try
            conn = New SqlConnection(strConn)
            conn.Open()
            Dim cmd As SqlCommand = New SqlCommand(query, conn)
            cmd.ExecuteNonQuery()
        Catch ex As SqlException
            Console.Write("SQL ERROR: " & ex.Message)
        Catch ex As Exception
            Console.Write("ERROR: " & ex.Message)
        Finally
              conn.Close()
        End Try
    End Sub


0
 
LVL 24

Expert Comment

by:Jeff Certain
ID: 18032124
If I had to guess, I'd say it's a convoluted way of making a system call from the database to set the system date/time.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:zachvaldez
ID: 18034163
Thanks, I understand the RUNSQL function, but what I dont get is the

"{native 'CALL WINS_SET_PARMS ....

This ia my first time to see this type use in a string
0
 
LVL 24

Expert Comment

by:Jeff Certain
ID: 18034171
Again, it's probably a call to the system to set the date and time.
0
 

Author Comment

by:zachvaldez
ID: 18034627
Is there  a need to use it or rather can a VB code handle it?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question