Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Syntax Error in NEW vb.net

Syntax Error in NEW vb.net

Scheduled Pinned Locked Moved ASP.NET
csharpsharepointbusinesshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raquidd22
    wrote on last edited by
    #1

    i read a article, Person data access

    public void Person_Save(ref int personID, string nameFirst, string nameLast, DateTime dob)
    {
    SqlCommand cmd;
    ExecuteNonQuery(out cmd, "Person_Save",
    CreateParameter("@PersonID", SqlDbType.Int, personID, ParameterDirection.InputOutput),
    CreateParameter("@NameFirst", SqlDbType.NVarChar, nameFirst),
    CreateParameter("@NameLast", SqlDbType.NVarChar, nameLast),
    CreateParameter("@DOB", SqlDbType.DateTime, dob));
    personID = (int)cmd.Parameters["@PersonID"].Value;
    cmd.Dispose();
    }

    person Business

    public void Save(IDbTransaction txn)
    {
    new Demo.DataAccessLayer.PersonDataService(txn).Person_Save(ref _personID, _nameFirst, _nameLast, _dob);
    }

    i implement in VB.net Layer Access DATA

        Public Sub contacto\_cliente\_auto\_Insert(ByVal contacto\_id As Integer, ByVal cliente\_id As Integer, ByVal serie As String)
            'revisado
            ExecuteNonQuery(SP.Nombre.cw\_co\_contacto\_cliente\_auto.ToString(), \_
                    CreateParameter("@i\_contacto\_id", AseDbType.Integer, contacto\_id), \_
                    CreateParameter("@i\_cliente\_id", AseDbType.Integer, cliente\_id), \_
                    CreateParameter("@i\_serie", AseDbType.NVarChar, serie))
        End Sub
    

    Layer Business

       Public Sub contacto\_cliente\_auto\_Insert(ByVal contacto\_id As Integer, ByVal cliente\_id As Integer, ByVal serie As String)
            new AccesoDatos.CRMWEB.AccesoDatos.contacto\_cliente\_autoCD().contacto\_cliente\_auto\_Insert(contacto\_id, cliente\_id, serie)
        End Sub
    

    then new is incorrect in Layer Business. i have the message Syntax Error Thanks for the time Regards

    B 1 Reply Last reply
    0
    • R raquidd22

      i read a article, Person data access

      public void Person_Save(ref int personID, string nameFirst, string nameLast, DateTime dob)
      {
      SqlCommand cmd;
      ExecuteNonQuery(out cmd, "Person_Save",
      CreateParameter("@PersonID", SqlDbType.Int, personID, ParameterDirection.InputOutput),
      CreateParameter("@NameFirst", SqlDbType.NVarChar, nameFirst),
      CreateParameter("@NameLast", SqlDbType.NVarChar, nameLast),
      CreateParameter("@DOB", SqlDbType.DateTime, dob));
      personID = (int)cmd.Parameters["@PersonID"].Value;
      cmd.Dispose();
      }

      person Business

      public void Save(IDbTransaction txn)
      {
      new Demo.DataAccessLayer.PersonDataService(txn).Person_Save(ref _personID, _nameFirst, _nameLast, _dob);
      }

      i implement in VB.net Layer Access DATA

          Public Sub contacto\_cliente\_auto\_Insert(ByVal contacto\_id As Integer, ByVal cliente\_id As Integer, ByVal serie As String)
              'revisado
              ExecuteNonQuery(SP.Nombre.cw\_co\_contacto\_cliente\_auto.ToString(), \_
                      CreateParameter("@i\_contacto\_id", AseDbType.Integer, contacto\_id), \_
                      CreateParameter("@i\_cliente\_id", AseDbType.Integer, cliente\_id), \_
                      CreateParameter("@i\_serie", AseDbType.NVarChar, serie))
          End Sub
      

      Layer Business

         Public Sub contacto\_cliente\_auto\_Insert(ByVal contacto\_id As Integer, ByVal cliente\_id As Integer, ByVal serie As String)
              new AccesoDatos.CRMWEB.AccesoDatos.contacto\_cliente\_autoCD().contacto\_cliente\_auto\_Insert(contacto\_id, cliente\_id, serie)
          End Sub
      

      then new is incorrect in Layer Business. i have the message Syntax Error Thanks for the time Regards

      B Offline
      B Offline
      Bharat Jain
      wrote on last edited by
      #2

      i think you should try the following

      Dim a as new AccesoDatos.CRMWEB.AccesoDatos.contacto_cliente_autoCD
      a.contacto_cliente_auto_Insert(contacto_id, cliente_id, serie)

      -Regards Bharat Jain bharat.jain.nagpur@gmail.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups