SQL-DB-Type für den SP-Übergabeparameter festlegen
[Visual Basic] Private Function Get_SqlDBType( _
ByVal col As DataColumn _
) As SqlDbType
SQLDBType
[Visual Basic] Private Function Get_SqlDBType(ByVal col As DataColumn) As SqlDbType
If col.DataType.Name = "Integer" Then Return SqlDbType.Int
If col.DataType.Name = "Int32" Then Return SqlDbType.Int
If col.DataType.Name = "String" Then Return SqlDbType.VarChar
If col.DataType.Name = "Boolean" Then Return SqlDbType.Bit
If col.DataType.Name = "DateTime" Then Return SqlDbType.DateTime
If col.DataType.Name = "Double" Then Return SqlDbType.Float
MsgBox(col.DataType.Name)
End Function
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition