Syntax Error in NEW vb.net
-
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
-
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
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