CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Apr 2010
    Posts
    5

    Unhappy Newbie coder needs help with code

    Hi there fellow forumers.

    I need your help with a small and simple interface im creating similar to an order form.

    Its written in ASP.NET and VB.

    I have 3 main files im coding from : webserice.asmx, webservice.vb and default.aspx

    I only have one webservice at the moment, it is primitive and simple and here is what it looks like :

    i left out the var declarations and headers
    *****************************************************************

    Code:
            conn.Open()
            cmd = conn.CreateCommand()
            cmd.CommandText = "INSERT INTO cdReq ([serial], [branch], [client], [status], [email], [address], [reason], [betaal], [bankBes], [reqDate], [regDate]) VALUES('" + serial.ToString + "', '" + branch + "', '" + client + "', '" + status + "', '" + email + "', '" + address + "', '" + reason + "', '" + betaal + "', '" + bankBes + "', '" + reqDate + "', '" + regDate + "')"
            cmd.ExecuteNonQuery()
            conn.Close()

    When i run JUST that service i can update the database sucessfully(using debugging mode)

    but when i try to update the database from my own interface(webservices.vb) it wont update it at all, and i really dont know where to look for my problem(all 3 files compile)

    Here is the code for the Webservices.vb file :

    Code:
    Option Strict On
    Imports System
    Imports System.Collections
    Imports System.Data
    Imports System.Data.OleDb
    Imports Microsoft.VisualBasic
    Imports System.Web
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    
    Public Class Cdform : Inherits Page
    
        Protected txtSerial As TextBox
        Protected txtEmail As TextBox
        Protected txtRegDate As TextBox
        Protected txtReqDate As TextBox
        Protected txtBranch As TextBox
        Protected txtClient As TextBox
        Protected txtAddress As TextBox
        Protected txtReason As TextBox
        Protected txtStatus As TextBox
        Protected txtBank As TextBox
        Protected txtPay As TextBox
        Protected cmdSubmit As Button
        '====================================
    
        Public Sub cmdSubmit_click(ByVal sender As Object, ByVal e As EventArgs)
    
            Dim myService As New Service1
            myService.addCD(txtSerial.text, txtBranch.text, txtClient.text, txtStatus.txt, txtEmail.text, txtAddress.text, txtReason.text, txtPay.text, txtBank.text, txtReqDate.text, txtRegDate.text)
        End Sub
    
    End Class
    '=========================================

    As far as i know i called the procedure correctly, giving all the var to the "Add cd" proc but it just wont update.


    Any help please?
    Last edited by HanneSThEGreaT; April 22nd, 2010 at 02:53 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured