Oct
13
2009
2

Export.FormatType = Valores CrystalReports 9.2

Valores que puede tomar Export.FormatType para exportar reportes de CrytalReports 9.2

Export.FormatType = 1 ' Crystal Report
Export.FormatType = 2  ' Data Interchange
Export.FormatType = 3  ' Record Style
Export.FormatType = 5  ' Comma seperated values
Export.FormatType = 6  ' Tab seperated values
Export.FormatType = 7  '; Character seperated values
Export.FormatType = 8  ' Text
Export.FormatType = 9  ' Tab seperated text
Export.FormatType = 10  ' Paginated Text
Export.FormatType = 11  ' Lotus 123WKS
Export.FormatType = 12  ' Lotus 123WK1
Export.FormatType = 13  ' Lotus 123WK3
Export.FormatType = 14  ' Word for Windows
Export.FormatType = 21  ' Excel 5.0
Export.FormatType = 22  ' Excel 5.0 tabular
Export.FormatType = 23  ' ODBC
Export.FormatType = 24  ' HTML32 standard
Export.FormatType = 25  ' Explorer32 Extend
Export.FormatType = 27  ' Excel 7.0
Export.FormatType = 28  ' Excel 7.0 tabular
Export.FormatType = 29  ' Excel 8.0
Export.FormatType = 30  ' Excel 8.0 tabluar
Export.FormatType = 31  ' Portable Document format (PDF)
Export.FormatType = 32  ' HTML40
Export.FormatType = 33  ' Crystal Report 7.0
Export.FormatType = 34  ' Report definition
Export.FormatType = 35  ' Exact Rich Text
Export.FormatType = 36  ' XML
Escrito por Karam en: .NET, VB6 | Etiquetas: , ,
Jun
30
2009
3

Recuperar Valor identity al hacer Insert vb .NET y SqlServer

Realizar un Insert y recuperar el valor del campo Identity (Auto incremental) al momento de realizar el Insert.

Pensando que la tabla tiene 5 campos (id identity,fecha,maq,dep,status)

Dim adap_lin As SqlClient.SqlDataAdapter
Dim tabla_lin As DataTable
sql = "INSERT INTO tbl_doc VALUES ('" & fecha_tmp & "'," & maq_tmp & "," & dep_tmp & "," & sta_tmp & ")"
sql = sql & ";Select @@Identity"   'Incrustamos el segundo query para ver que consecutivo  asignó.
Try
   dadaptador = New SqlClient.SqlDataAdapter(sql, cadena)
   dadaptador.Fill(dtabla) 'dtabla debe de traer el ultimo folio
   If dtabla.Rows.Count > 0 Then
        Lfolio.Text = dtabla.Rows(0).Item(0).ToString  'AQUI VIENE EL VALOR IDENTITY
   end try          
Catch ex As Exception
    MsgBox("Error al guardar " & ex.ToString, MsgBoxStyle.Critical, "Error al guardar folio")
End Try
Escrito por Karam en: .NET, SQL | Etiquetas: ,

www.karam.com.mx Powered by WP and SoftKar