visio COMException (0x86DB1130)

rezance

Member
Joined
Dec 13, 2012
Messages
8
Programming Experience
1-3
Hello, I working on addin for visio for importing a visualising data.
I have some related tables in database. Addin retrieve data by access sql query several times, but last query doesnt work.
This is that query:
VB.NET:
SELECT tblZoznamIO.IdIO, tblZoznamIO.NazovIO, tblPouzitieIO.Id, tblZoznamIO.TypIO, tblProcesy.KodProcesu FROM tblProcesy INNER JOIN (tblProcesnyTok INNER JOIN (tblZoznamIO INNER JOIN tblPouzitieIO ON tblZoznamIO.IdIO = tblPouzitieIO.IdIO.Value) ON tblProcesnyTok.Id = tblPouzitieIO.Id.Value) ON tblProcesy.IdProces = tblProcesnyTok.IdProces WHERE (((tblProcesy.KodProcesu)='M1.1'));
Design view of query
Untitled.jpg

That the error:


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x86DB1130):


An exception occurred.
at Microsoft.Office.Interop.Visio.DataRecordsetsClass.Add(Object ConnectionIDOrString, String CommandString, Int32 addOptions, String Name)
at VisioEPCaddin.frmZoznamProcesov.Pripojenie() in C:\Users\martin\Documents\Visual Studio 2010\Projects\VisioEPCaddin\VisioEPCaddin\frmZoznamProcesov.vb:line 39
at VisioEPCaddin.frmZoznamProcesov.frmZoznamProcesov_Load(Object sender, EventArgs e) in C:\Users\martin\Documents\Visual Studio 2010\Projects\VisioEPCaddin\VisioEPCaddin\frmZoznamProcesov.vb:line 20
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thats my code:
VB.NET:
        strIO = "SELECT tblZoznamIO.IdIO, tblZoznamIO.NazovIO, tblPouzitieIO.Id, tblZoznamIO.TypIO, tblProcesy.KodProcesu FROM tblProcesy INNER JOIN (tblProcesnyTok INNER JOIN (tblZoznamIO INNER JOIN tblPouzitieIO ON tblZoznamIO.IdIO = tblPouzitieIO.IdIO.Value) ON tblProcesnyTok.Id = tblPouzitieIO.Id.Value) ON tblProcesy.IdProces = tblProcesnyTok.IdProces WHERE (((tblProcesy.KodProcesu)='M1.1'));"
        drsIO = pjVis.DataRecordsets.Add(strConnection, strIO, 0, "Dataset name")
for other queries works fine
 
Back
Top