Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - Overlord

#1
Amigos:

¿Es posible crear una aplicacion en vb.NET y que se conecte a un BD Access en otro servidor de la misma red?

La idea de esto es crear un software e instalarlo en diferentes equipos y que se puedan conectar en red a un servidor con la bd para poder trabajar. Entonces no se si existiran problemas con el manejo de datos.

¿Alguien me podria especificar como hago la conexion?

Gracias
#2
Amigos:

Estoy tratando de hacer un sistema de plantillas para mi web baso en el codigo de phpbb, pero tengo problemas, aqui les pongo el codigo:

clases.php

<?
class plantilla{
var $_tpldata = array();

/* Pasamos el nombre de la variables sin su extención */
        function plantilla($template_file){
                $this->jnt_file = 'themes/yellow/' . $template_file . '.jnt';
        }
       
/* Resibe la variable */
        function asigna_variables($vars){
                $this->vars= (empty($this->vars)) ? $_vars : $this->vars . $vars;
echo  $vars[2];
        }
       
/*extraido de phpbb2, funcion para una consulta SQL */
function assign_block_vars($vararray)
{
$blockname = $this->jnt_file;
reset($this);
if (strstr($blockname, '.'))
{
// Nested block.

$blocks = explode('.', $blockname);
$blockcount = sizeof($blocks) - 1;
$str = '$this->_tpldata';
for ($i = 0; $i < $blockcount; $i++)
{
$str .= '[\'' . $blocks[$i] . '.\']';
eval('$lastiteration = sizeof(' . $str . ') - 1;');
$str .= '[' . $lastiteration . ']';

}
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';

// Now we evaluate this assignment we've built up.
eval($str);
}
else
{
// Top-level block.
// Add a new iteration to this block with the variable assignments
// we were given.
$this->_tpldata[$blockname . '.'][] = $vararray;
}

return true;
}


/* Funcion encargada de cargar el archivo para ser mostrado */
function loadfile($handle)
{
$handle = "body.jnt";
// If the file for this handle is already loaded and compiled, do nothing.
if (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))
{
return true;

}

// Si el archivo no existe.
//echo "<b>$this->files[$handle]</b><br>";
if (!isset($this->files['themes/yellow/body.jnt']))
{
die("Template->loadfile(): No file specified for handle $handle");
}

$filename = $this->files[$handle];

$str = implode("", @file($filename));
if (empty($str))
{
die("Template->loadfile(): File $filename for handle $handle is empty");
}

$this->uncompiled_code[$handle] = $str;

return true;
}

function pparse()
{
$handle=$this->jnt_file;
//echo $handle;
if (!$this->loadfile($handle))
{
die("Template->pparse(): Couldn't load template file for handle $handle");
}

// actually compile the template now.
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
{
// Actually compile the code now.
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
}

// Run the compiled code.
eval($this->compiled_code[$handle]);
return true;
}

}
?>


categorias.php

<?
$jnt_template=new plantilla("body");

//assign_block_vars
$resp = mysql_query("select * FROM categorias ORDER BY c_id") ;
while($datos = mysql_fetch_array($resp))
{
//$jnt_template->assign_block_vars('body',array
$jnt_template->assign_block_vars(array
(
'SECCION_N' => $datos['nombre'],
'DESCRIPCION' => $datos['descripcion']
));

};
//$ContenidoString = $jnt_template->muestra();
//echo $ContenidoString;
$jnt_template->pparse();
mysql_free_result($resp) ;
mysql_close($conectar) ;

?>


El problema es el siguiente:
Tengo el archivo de plantila en themes/yellow/body.xxx, entonces php me arroja el siguiente error:

Template->loadfile(): No file specified for handle body.jnt

En resumen lo que quiero es hacer una paginas con plantillas y que php me lea las {varibles} en un archivo html.

PD: Tiene que ser usando un bucle para las consultas

¿Alguien me puede ayudar?

Gracias.
#3
Alguien sabe como puedo leer un codigo de barras o DNI de una pesona con un "LECTOR DE CODIGOS DE BARRA CONECTADO AL PC" a travez de VB?
#4
Programación Visual Basic / Trabajo con archivos
30 Noviembre 2005, 19:45 PM
Hola.

Como puedo desde visual basic dale a archivos propiedades de oculto????
#5
Programación Visual Basic / Cystal Report 8.5 y VB
16 Noviembre 2005, 20:02 PM
Hola a todos.

Alguien sabe como puedo pasar parametros a crystal report desde visual basic? necesito pasar un rango de fechas para que se me muestre un informe de dicha fecha. Gracias  :D
#6
Hola a todos  :)

Quien sabe como puedo centrar una imagen en el fondo de una formulario MDI (principal) :-)

Muchas gracias
#7
Programación Visual Basic / ListBox
21 Octubre 2005, 01:18 AM
Hola.

En un list tengo 10 numeros, del 0 al 9. ¿Alguien sabe como puedo obtener el valor de dicho numero al ir haciendo click en el scroll? :-)
#8
Hola a todos, estoy haciendo un escanador de puertos, a nivel local funciona bien pero cuando intento escanear otra maquina me dice que el buffer es insuficiente ¿como lo soluciono?, este es mi codido:

Private Sub Form_Load()
Winsock1.Listen

End Sub

Private Sub Text1_Change()

End Sub

Private Sub txtPuerto1_Change()
'If txtPuerto1.Text = "" Or Val(txtPuerto1.Text) <= 0 Or Val(txtPuerto1.Text) >= Val(txtPuerto2.Text) Then
'    txtPuerto1.Text = 1
'End If
End Sub

Private Sub txtPuerto2_v()
If txtPuerto2.Text = "" Or Val(txtPuerto2.Text) <= 0 Or Val(txtPuerto2.Text) <= Val(txtPuerto1.Text) Then
    txtPuerto2.Text = 6000
End If
End Sub

Private Sub Winsock1_Connect()
txtPuertos.Text = txtPuertos & vbCrLf & varPuerto
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim dato As String
    Winsock1.GetData dato
    MsgBox dato
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
'MsgBox Description
End Sub