用sql设置access的默认值

2019-04-02 19:47:27王冬梅

    End With
    Set MyDB = Nothing

Bye_GetFieldDescription:
    Exit Function

Err_GetFieldDescription:
    Beep
    Debug.Print Err.Description
    MsgBox Err.Description, vbExclamation
    GetFieldDescription = Null
    Resume Bye_GetFieldDescription

End Function

 
关于“多步错误”的一些参考:

Sub ChangeUnicode()

   Dim tdf As TableDef
   Dim fld As Field
   Dim db As Database
   Dim pro As Property

   Set db = CurrentDb

   For Each tdf In db.TableDefs
       For Each fld In tdf.Fields
           If fld.Type = dbText Then
           If DBEngine.Errors(0).Number = 3270 Then
               Set pro = fld.CreateProperty("UnicodeCompression", 1, 0)
               fld.Properties.Append p
           End If
               fld.Properties("UnicodeCompression") = True
           End If
       Next fld
   Next tdf
End Sub

您可能感兴趣的文章:

列出SQL Server中具有默认值的所有字段的语句input之怎么清除默认值MySQL表字段设置默认值(图文教程及注意细节)