Click here to Skip to main content
16,006,535 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioninserting data in to ms access database Pin
bapu288923-Mar-08 4:38
bapu288923-Mar-08 4:38 
GeneralRe: inserting data in to ms access database Pin
pmarfleet23-Mar-08 5:26
pmarfleet23-Mar-08 5:26 
GeneralRe: inserting data in to ms access database Pin
Paul Conrad23-Mar-08 5:35
professionalPaul Conrad23-Mar-08 5:35 
GeneralRe: inserting data in to ms access database Pin
pmarfleet23-Mar-08 5:51
pmarfleet23-Mar-08 5:51 
QuestionRe: inserting data in to ms access database Pin
bapu288923-Mar-08 6:00
bapu288923-Mar-08 6:00 
GeneralRe: inserting data in to ms access database Pin
Dave Kreskowiak23-Mar-08 15:38
mveDave Kreskowiak23-Mar-08 15:38 
GeneralHosting controls on a layered window Pin
Soumik Chatterjee23-Mar-08 4:02
Soumik Chatterjee23-Mar-08 4:02 
GeneralCalling Web Service using VB6 without SOAP Pin
Kumaran21cen23-Mar-08 3:16
Kumaran21cen23-Mar-08 3:16 
Iam using HTTP to call web service without SOAP. It gives Error: 500"
Please anyone tell whats the error.
Actually its status is not 200.
Is there any other method to call webservice using vb6 without SOAP?
Here is my code below:



Public Function Run_WebService(ByRef InForm As Form, ByVal CaseNo As Integer) As Boolean

On Error GoTo Catch

Dim IsOk As Boolean
Dim StrResults As String
Dim ObjXMLHTTP As Object
Dim ObjXMLDOM As Object
Const WebSite As String = "http://localhost/MyService/MyWebService.asmx/"
Dim iPos As Long, jPos As Long
Dim MakeParameters As String


IsOk = False
Set ObjXMLHTTP = CreateObject("Microsoft.XMLHTTP")
Set ObjXMLDOM = CreateObject("Microsoft.XMLDOM")

Select Case CaseNo
Case 1
With ObjXMLHTTP
.Open "GET", WebSite & "MyProduct?ID=5" , False ', "sa", "password"
.Send
DoEvents

If .Status = 200 Then 'is ok
'Load the XML document from the webservice
ObjXMLDOM.loadXML .ResponseText

'check if there are any errors
If ObjXMLDOM.parseError.ErrorCode <> 0 Then
MsgBox .ResponseText
IsOk = False
Else
'Get the results
StrResults = ObjXMLDOM.GetElementsByTagName("string").Item(0).Text
'iPos = InStr(1, StrResults, "<code>", vbTextCompare)
'iPos = iPos + Len("<code>")
'jPos = InStr(1, StrResults, "</code>", vbTextCompare)
'If Val(jPos) = 0 Then
' StrResults = "Invalid Country."
'Else
' StrResults = Mid$(StrResults, iPos, jPos - iPos)
'End If
'InForm.txtResults(0).Text = StrResults
IsOk = True
End If
Else
MsgBox "ERROR - " & .Status, vbCritical, "ERROR"
IsOk = False
End If
End With
End Select

ExitFunction:
Set ObjXMLHTTP = Nothing
Set ObjXMLDOM = Nothing
StrResults = vbNullString

Run_WebService = IsOk
Exit Function
Catch:
MsgBox Err.Description
End Function

Thanks & Regards
Kumaran

GeneralRe: Calling Web Service using VB6 without SOAP Pin
Dave Kreskowiak24-Mar-08 4:01
mveDave Kreskowiak24-Mar-08 4:01 
Generalrandom records Pin
bapu288923-Mar-08 1:03
bapu288923-Mar-08 1:03 
GeneralRe: random records Pin
Christian Graus23-Mar-08 11:33
protectorChristian Graus23-Mar-08 11:33 
Generalc++ and visual basic share an enum. Pin
nina80222-Mar-08 20:51
nina80222-Mar-08 20:51 
GeneralRe: c++ and visual basic share an enum. Pin
Christian Graus23-Mar-08 11:37
protectorChristian Graus23-Mar-08 11:37 
GeneralFile Package Pin
Ahmad Rifai Yusuf22-Mar-08 16:16
Ahmad Rifai Yusuf22-Mar-08 16:16 
GeneralRe: File Package Pin
Christian Graus22-Mar-08 16:33
protectorChristian Graus22-Mar-08 16:33 
GeneralLocking down a form from user input.... Pin
RayG22-Mar-08 8:18
RayG22-Mar-08 8:18 
GeneralRe: Locking down a form from user input.... Pin
Christian Graus22-Mar-08 11:45
protectorChristian Graus22-Mar-08 11:45 
GeneralRe: Locking down a form from user input.... Pin
darkelv22-Mar-08 18:35
darkelv22-Mar-08 18:35 
QuestionPrinting from a DataGridView Row by Row??? Pin
ukboy22-Mar-08 1:14
ukboy22-Mar-08 1:14 
QuestionHi guys newbie programming question - Parsing a string Pin
tgebrael21-Mar-08 21:11
tgebrael21-Mar-08 21:11 
GeneralRe: Hi guys newbie programming question - Parsing a string Pin
darkelv21-Mar-08 21:41
darkelv21-Mar-08 21:41 
GeneralRe: Hi guys newbie programming question - Parsing a string Pin
tgebrael21-Mar-08 21:47
tgebrael21-Mar-08 21:47 
GeneralRe: Hi guys newbie programming question - Parsing a string Pin
darkelv21-Mar-08 22:01
darkelv21-Mar-08 22:01 
Generalimplementing linq Pin
ganero21-Mar-08 17:32
ganero21-Mar-08 17:32 
GeneralRe: implementing linq Pin
Christian Graus21-Mar-08 19:38
protectorChristian Graus21-Mar-08 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.