檔案 Report 24560_3064_{25683DD8-05D0-4ADE-9BB6-5B76420E328B}.rpt 錯誤: 無法從資料庫擷取資料。 細目: [資料庫廠商代碼: 4063 ]
解決方法︰
ORA-4063 means Table/View has errors.
- Crystal_Managed2003.msm (如果有水晶报表)
- dotnetfxredist_x86.msm (.net一定是必须的)
- ... (如果有引用其他的dll)
- VC_User_CRT71_RTL_X86_---.msm
- VC_User_STL71_RTL_X86_---.msm
- 'power by: landlordh
- 'for 2000,xp,2003
- Module uninstall
- Sub Main()
- Dim myProcess As Process = New Process
- If System.Environment.OSVersion. ToString.IndexOf("NT 5") Then
- myProcess.Start("msiexec", "/X {2B65D4A9-C146-4808-AB4B-321F B0779559}") '改为自己的ProductCode
- End If
- myProcess.Close()
- End Sub
- End Module
Public Sub userDefinePrint(sh As Worksheet, sharePath As String, shareName As String, printerName As String)
TryAgain:
On Error Resume Next
Dim printerFullName As String
printerFullName = NetworkPrinter(sharePath & "\" & printerName)
ActivePrinter = printerFullName
If Err.Number <> 0 Then
PrintServer = sharePath & "\" & shareName
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.AddWindowsPrinterConnection (PrintServer)
GoTo TryAgain
End If
With sh.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PaperSize = 234
End With
If Err.Number <> 0 Then
sh.PrintOut Copies:=1, Preview:=False, ActivePrinter:=printerFullName, Collate:=True
Else
sh.PrintOut Copies:=1, Preview:=False, ActivePrinter:=printerFullName, Collate:=True
End If
End Sub
Public Function NetworkPrinter(ByVal myprinter As String)
On Error Resume Next
Dim NetWork As Variant
Dim X As Integer
Dim Prt_On As String
Prt_On = " on "
'/// Define NetWork Array \\\
NetWork = Array("Ne00:", "Ne01:", "Ne02:", "Ne03:", "Ne04:", _
"Ne05:", "Ne06:", "Ne07:", "Ne08:", _
"Ne09:", "Ne10:", "Ne11:", "Ne12:", _
"Ne13:", "Ne14:", "Ne15:", "Ne16:", _
"LPT1:", "LPT2:", "File:", "SMC100:")
'Setup printer to Print
X = 0
TryAgain:
On Error Resume Next
'Printer
Application.ActivePrinter = myprinter & Prt_On & NetWork(X)
If Err.Number <> 0 And X < 16 Then X = X + 1 GoTo TryAgain ElseIf Err.Number <> 0 And X > 15 Then
GoTo PrtError
End If
On Error GoTo 0
NetworkPrinter = myprinter & Prt_On & NetWork(X)
errorExit:
Exit Function
PrtError:
'no printer found
NetworkPrinter = ""
Resume errorExit
End Function