Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Estas en el tema de Error 446 Object doesnt support named arguments Alguien Puede Ayudarme? en el foro de Visual Basic clásico en Foros del Web. Hola.... Tengo este error: Error 446 Object doesnt support named arguments tengo esta funcion don de hago la conexion Private Sub Cargar() Dim CantReg As ...
  #1 (permalink)  
Antiguo 12/11/2008, 13:33
 
Fecha de Ingreso: noviembre-2008
Mensajes: 131
Antigüedad: 15 años, 5 meses
Puntos: 0
Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Hola....

Tengo este error:
Error 446 Object doesnt support named arguments

tengo esta funcion don de hago la conexion

Private Sub Cargar()

Dim CantReg As Variant

Connect.Provider = "SQLOLEDB"
Connect.Open "Driver={SQL Server};" & _
"Server=" & macForm.ConnInfo.Server & _
";Uid=" & macForm.ConnInfo.User & _
";Pwd=" & macForm.ConnInfo.pwd & _
";Database=" & macForm.ConnInfo.DB

Set Rsl = New ADODB.Recordset
Set Rs2 = New ADODB.Recordset

Cadena_SQL = "SELECT COUNT(*) as cus_name FROM OECOTIZACION_SQL"
Cadena_SQL_2 = "SELECT * FROM OECOTIZACION_SQL"

Rsl.Open Cadena_SQL, Connect, adOpenDynamic, adLockPessimistic
Rs2.Open Cadena_SQL_2, Connect, adOpenDynamic, adLockPessimistic

CantReg = Rsl.Fields("cus_name")

Rs2.MoveFirst

For i = 0 To CantReg - 1
Combo_Cliente.AddItem Rs2.Fields("cus_name")
Rs2.MoveNext

Next i

End Sub

y tengo la funcion de consultar

Private Sub Cmd_Aceptar1_Click()


Cadena_SQL = "Select * from OECOTIZACION_SQL"
StrSql = ""

If Text_Fecha.Text <> "" Then
StrSql = StrSql + "cot_date=" & Text_Fecha.Text + " and "
End If

If Text_Id.Text <> "" Then
StrSql = StrSql + "cot_number=" & Text_Id.Text + " and "
End If

If Combo_Cliente.Text <> "" Then
StrSql = StrSql + "cus_name=" & Combo_Cliente.Text
End If

If Text_Producto.Text <> "" Then
StrSql = StrSql + "item_no=" & Text_Producto.Text
End If

If Text_Product.Text <> "" Then
StrSql = StrSql + "search_desc=" & Text_Product.Text
End If

If Text_Especific.Text <> "" Then
StrSql = StrSql + "Especific_prod=" & Text_Especif.Text
End If

If Text_Presentacion.Text <> "" Then
StrSql = StrSql + "item_desc_2=" & Cmd_present.Text
End If

If Text_Cantidad.Text <> "" Then
StrSql = StrSql + "qty_prod=" & Text_Presentacion.Text
End If

If Text_Precio.Text <> "" Then
StrSql = StrSql + "prc_or_disc_1=" & Text_Precio.Text
End If

If Text_Validez.Text <> "" Then
StrSql = StrSql + "end_prc=" & Text_Validez.Text
End If

If Combo_terminos.Text <> "" Then
StrSql = StrSql + "pay_term=" & Combo_terminos.Text
End If

If Text_Direccion.Text <> "" Then
StrSql = StrSql + "addr_1=" & Text_Direccion.Text
End If

If Text_Reque.Text <> "" Then
StrSql = StrSql + "lead_time=" & Text_Reque.Text
End If

If Combo_Vendedor.Text <> "" Then
StrSql = StrSql + "cot_sales=" & Combo_Vendedor.Text
End If

If Text_Observ.Text <> "" Then
StrSql = StrSql + "cot_Observ=" & Text_Observ.Text
End If

If StrSql <> "" Then
Cadena_SQL = Cadena_SQL + " where " + StrSql

cadena = Cadena_SQL
desde = Len(cadena)
hasta = (desde - 5)
Cadena_SQL = Mid(cadena, 1, hasta)

End If

Connect.RecordSource = Cadena_SQL ' AQUI ME SALE EL ERROR
'Rs2.Refresh
Fra_Funciones.Visible = True
Fra_Consultar.Visible = False
  #2 (permalink)  
Antiguo 13/11/2008, 02:49
Colaborador
 
Fecha de Ingreso: enero-2008
Ubicación: Unas veces aquí, otras veces allí
Mensajes: 1.482
Antigüedad: 16 años, 3 meses
Puntos: 37
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Por favor, no repetir posts:

http://www.forosdelweb.com/f69/probl...t-open-643587/

  #3 (permalink)  
Antiguo 13/11/2008, 06:46
 
Fecha de Ingreso: noviembre-2008
Mensajes: 131
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Hola Avellaneda...

Me podrias explicar que no puedo repetir?
  #4 (permalink)  
Antiguo 13/11/2008, 07:02
 
Fecha de Ingreso: noviembre-2008
Mensajes: 38
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

proba colocandole ' a cada linea que le falta, tambien para no estar borrando los ultimos caracteres de la cadena strsql


If text_fecha.text <> "" Then
StrSql = StrSql + " and "
StrSql = StrSql + "cot_date= ' " & text_fecha.text & " ' "
End If

suerte
  #5 (permalink)  
Antiguo 13/11/2008, 07:21
 
Fecha de Ingreso: noviembre-2008
Mensajes: 131
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Hola Alexis...

Ya lo voy a probar....

Gracias y ya te cuento.
  #6 (permalink)  
Antiguo 13/11/2008, 07:35
 
Fecha de Ingreso: noviembre-2008
Mensajes: 131
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

No Alexis ya lo probe y no funciona el error me sale en esta linea:

Connect.RecordSource = Cadena_SQL
  #7 (permalink)  
Antiguo 13/11/2008, 07:45
Colaborador
 
Fecha de Ingreso: enero-2008
Ubicación: Unas veces aquí, otras veces allí
Mensajes: 1.482
Antigüedad: 16 años, 3 meses
Puntos: 37
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

Cita:
Iniciado por natalyro Ver Mensaje
Hola Avellaneda...

Me podrias explicar que no puedo repetir?
No he dicho que no puedas sino que por favor no repitas los mensajes.

Es básico en la política de los foros.

Leiste el post que te indiqué?

http://www.forosdelweb.com/f69/probl...t-open-643587/
  #8 (permalink)  
Antiguo 13/11/2008, 07:49
 
Fecha de Ingreso: noviembre-2008
Mensajes: 131
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Error 446 Object doesnt support named arguments Alguien Puede Ayudarme?

a ya...

Bueno gracias que pena....

chao
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:50.