From: Kevin on 6 Jul 2010 07:50 I am working on an application which uses VO2Ado to connect to an SQL Server 2005 database and all was working fine. Now when I start the program in the IDE CAVO crashes with an error message with the options for 'Report' and 'Sorry' and no clue as to where the problem is. I have tried the following and still have the problem: 1. Commented out the line which opens the connection, so that the shell of the app should open. 2. Reindex the project within the IDE. 3. Reindex the project outside the IDE. 4. Export all apps and libs using VOPP then delete the project. Then create a new project and reimport and rebuild the apps. 5. Restarted the computer. Another app in the project that does not use VO2Ado runs fine. The Explorer DataLv sample that comes with VO2Ado runs but does not include the SQL Server Express in the list. I can connect to the database using Microsoft SQL Server Management Studio Express and SQL Master. None of the code in the app that uses VO2Ado has been changed. Can anyone give me any idea of what may have gone wrong or how to fix it? The only changes on my system, software wise that may have an effect are that I installed Vn2Ado to start using Vulcan. I have not yet created a program that uses Vn2Ado to create the connection. The code for opening the connection is below, but as this has not been changed, and commenting out the line that calls it has no affect I cannot see why this might be the problem. Thanks in advance. Kevin method OpenConnection() class StandardShellWindow // // Open ADOConnection // local oConn as ADOConnection local cbErr as codeblock local uError as usual local cConnStr as string local cMsg as string local cError as string local oWB as WarningBox local lOpen as logic // Set error handler cbErr := ErrorBlock( {|oErr| _Break( oErr )}) // Connection string cConnStr := "Provider=MSDASQL;Persist Security Info=False;Data Source=DataSrc;Initial Catalog=DataCar;" begin sequence oConn := AdoConnection{} oConn:ConnectionTimeout := 5 oConn:ConnectionString := cConnStr // setup prompt oConn:Properties:[item, "Prompt"]:Value := AdPromptComplete // Set cursor location oConn:CursorLocation := AdUseClient lOpen := true recover using uError cMsg := "Failed to create connection." + CRLF cMsg += uError:description // Show message oWB := WarningBox{ self, "Open ADOConnection", cMsg } oWB:Show() lOpen := false end sequence if lOpen // Open connectin begin sequence oConn:Open(nil,nil,nil,nil) recover using uError end if oConn:State <> adStateOpen cError := "Failed to open connection." + CRLF // Error occurred if oConn:Errors:Count > 0 // ADO Error cError := oConn:Errors:[item,1]:description elseif IsInstanceOf(uError, #Error) cError := uError:description else cError := "Unknown error" endif oWB := WarningBox{ self, "Open ADOConnection", cError } oWB:Show() else self:Menu:DisableItem( IDM_mnuFuel_Connection_Open_ID ) self:Menu:EnableItem( IDM_mnuFuel_Connection_Close_ID ) self:Menu:EnableItem( IDM_mnuFuel_Connection_Create_Table_ID ) AdoSetConnection( oConn ) endif endif // Restore handler ErrorBlock( cbErr ) return nil
From: E®!k /!$$E® on 6 Jul 2010 08:13 Kevin, Try one of these OleDB drivers Provider=SQLNCLI Provider=SQLOLEDB hth Erik "Kevin" <kdmurphy(a)eircom.net> schreef in bericht news:VLEYn.245$K4.100(a)news.indigo.ie... > I am working on an application which uses VO2Ado to connect to an SQL > Server 2005 database and all was working fine. Now when I start the > program in the IDE CAVO crashes with an error message with the options for > 'Report' and 'Sorry' and no clue as to where the problem is. I have tried > the following and still have the problem: > > 1. Commented out the line which opens the connection, so that the shell of > the app should open. > 2. Reindex the project within the IDE. > 3. Reindex the project outside the IDE. > 4. Export all apps and libs using VOPP then delete the project. Then > create a new project and reimport and rebuild the apps. > 5. Restarted the computer. > > Another app in the project that does not use VO2Ado runs fine. The > Explorer DataLv sample that comes with VO2Ado runs but does not include > the SQL Server Express in the list. I can connect to the database using > Microsoft SQL Server Management Studio Express and SQL Master. > > None of the code in the app that uses VO2Ado has been changed. > > Can anyone give me any idea of what may have gone wrong or how to fix it? > > The only changes on my system, software wise that may have an effect are > that I installed Vn2Ado to start using Vulcan. I have not yet created a > program that uses Vn2Ado to create the connection. > > The code for opening the connection is below, but as this has not been > changed, and commenting out the line that calls it has no affect I cannot > see why this might be the problem. > > Thanks in advance. > > Kevin > > method OpenConnection() class StandardShellWindow > // > // Open ADOConnection > // > local oConn as ADOConnection > local cbErr as codeblock > local uError as usual > local cConnStr as string > local cMsg as string > local cError as string > local oWB as WarningBox > local lOpen as logic > > // Set error handler > cbErr := ErrorBlock( {|oErr| _Break( oErr )}) > > // Connection string > cConnStr := "Provider=MSDASQL;Persist Security Info=False;Data > Source=DataSrc;Initial Catalog=DataCar;" > > begin sequence > oConn := AdoConnection{} > oConn:ConnectionTimeout := 5 > oConn:ConnectionString := cConnStr > // setup prompt > oConn:Properties:[item, "Prompt"]:Value := AdPromptComplete > > // Set cursor location > oConn:CursorLocation := AdUseClient > > lOpen := true > > recover using uError > cMsg := "Failed to create connection." + CRLF > cMsg += uError:description > > // Show message > oWB := WarningBox{ self, "Open ADOConnection", cMsg } > oWB:Show() > > lOpen := false > > end sequence > > if lOpen > // Open connectin > begin sequence > oConn:Open(nil,nil,nil,nil) > > recover using uError > end > > if oConn:State <> adStateOpen > cError := "Failed to open connection." + CRLF > > // Error occurred > if oConn:Errors:Count > 0 > // ADO Error > cError := oConn:Errors:[item,1]:description > elseif IsInstanceOf(uError, #Error) > cError := uError:description > > else > cError := "Unknown error" > endif > > oWB := WarningBox{ self, "Open ADOConnection", cError } > oWB:Show() > > else > self:Menu:DisableItem( IDM_mnuFuel_Connection_Open_ID ) > self:Menu:EnableItem( IDM_mnuFuel_Connection_Close_ID ) > self:Menu:EnableItem( IDM_mnuFuel_Connection_Create_Table_ID ) > AdoSetConnection( oConn ) > > endif > > endif > > // Restore handler > ErrorBlock( cbErr ) > > return nil >
From: Kevin on 6 Jul 2010 09:27 Erik, Thanks for your reply. Microsoft OLE DB Provider for ODBC Drivers Using the above option in Data Link Properties I can select an ODBC entry for the database. However using Microsoft OLE DB Provider for SQL Server does not list SQL Server Express as it used to. However, changing the connection string would surely only cause a crash of the app when used, rather than the IDE when the program runs, which is what happening. Kevin "ER!k \/!$$ER" <nospam(a)nospam.com> wrote in message news:89gnuhFk1vU1(a)mid.individual.net: > Kevin, > > Try one of these OleDB drivers > Provider=SQLNCLI > Provider=SQLOLEDB > > hth > > Erik > > "Kevin" <kdmurphy(a)eircom.net> schreef in bericht > news:VLEYn.245$K4.100(a)news.indigo.ie... > > I am working on an application which uses VO2Ado to connect to an SQL > > Server 2005 database and all was working fine. Now when I start the > > program in the IDE CAVO crashes with an error message with the options for > > 'Report' and 'Sorry' and no clue as to where the problem is. I have tried > > the following and still have the problem: > > > > 1. Commented out the line which opens the connection, so that the shell of > > the app should open. > > 2. Reindex the project within the IDE. > > 3. Reindex the project outside the IDE. > > 4. Export all apps and libs using VOPP then delete the project. Then > > create a new project and reimport and rebuild the apps. > > 5. Restarted the computer. > > > > Another app in the project that does not use VO2Ado runs fine. The > > Explorer DataLv sample that comes with VO2Ado runs but does not include > > the SQL Server Express in the list. I can connect to the database using > > Microsoft SQL Server Management Studio Express and SQL Master. > > > > None of the code in the app that uses VO2Ado has been changed. > > > > Can anyone give me any idea of what may have gone wrong or how to fix it? > > > > The only changes on my system, software wise that may have an effect are > > that I installed Vn2Ado to start using Vulcan. I have not yet created a > > program that uses Vn2Ado to create the connection. > > > > The code for opening the connection is below, but as this has not been > > changed, and commenting out the line that calls it has no affect I cannot > > see why this might be the problem. > > > > Thanks in advance. > > > > Kevin > > > > method OpenConnection() class StandardShellWindow > > // > > // Open ADOConnection > > // > > local oConn as ADOConnection > > local cbErr as codeblock > > local uError as usual > > local cConnStr as string > > local cMsg as string > > local cError as string > > local oWB as WarningBox > > local lOpen as logic > > > > // Set error handler > > cbErr := ErrorBlock( {|oErr| _Break( oErr )}) > > > > // Connection string > > cConnStr := "Provider=MSDASQL;Persist Security Info=False;Data > > Source=DataSrc;Initial Catalog=DataCar;" > > > > begin sequence > > oConn := AdoConnection{} > > oConn:ConnectionTimeout := 5 > > oConn:ConnectionString := cConnStr > > // setup prompt > > oConn:Properties:[item, "Prompt"]:Value := AdPromptComplete > > > > // Set cursor location > > oConn:CursorLocation := AdUseClient > > > > lOpen := true > > > > recover using uError > > cMsg := "Failed to create connection." + CRLF > > cMsg += uError:description > > > > // Show message > > oWB := WarningBox{ self, "Open ADOConnection", cMsg } > > oWB:Show() > > > > lOpen := false > > > > end sequence > > > > if lOpen > > // Open connectin > > begin sequence > > oConn:Open(nil,nil,nil,nil) > > > > recover using uError > > end > > > > if oConn:State <> adStateOpen > > cError := "Failed to open connection." + CRLF > > > > // Error occurred > > if oConn:Errors:Count > 0 > > // ADO Error > > cError := oConn:Errors:[item,1]:description > > elseif IsInstanceOf(uError, #Error) > > cError := uError:description > > > > else > > cError := "Unknown error" > > endif > > > > oWB := WarningBox{ self, "Open ADOConnection", cError } > > oWB:Show() > > > > else > > self:Menu:DisableItem( IDM_mnuFuel_Connection_Open_ID ) > > self:Menu:EnableItem( IDM_mnuFuel_Connection_Close_ID ) > > self:Menu:EnableItem( IDM_mnuFuel_Connection_Create_Table_ID ) > > AdoSetConnection( oConn ) > > > > endif > > > > endif > > > > // Restore handler > > ErrorBlock( cbErr ) > > > > return nil > >
From: E®!k /!$$E® on 6 Jul 2010 12:02 Kevin, Is the Sql Service manager running? Is it installed local? Otherwise, google for network issues on SqlServer Express. Anyway, and you qare right this does not cause your problem, but it does not make any sense (to me) to access the data via an extra layer Sql-Odbc-OleDB. Erik "Kevin" <kdmurphy(a)eircom.net> schreef in bericht news:5bGYn.246$K4.107(a)news.indigo.ie... > Erik, > > Thanks for your reply. > > Microsoft OLE DB Provider for ODBC Drivers > > Using the above option in Data Link Properties I can select an ODBC entry > for the database. > > However using > Microsoft OLE DB Provider for SQL Server > > does not list SQL Server Express as it used to. > > However, changing the connection string would surely only cause a crash of > the app when used, rather than the IDE when the program runs, which is > what happening. > > Kevin > > > "ER!k \/!$$ER" <nospam(a)nospam.com> wrote in message > news:89gnuhFk1vU1(a)mid.individual.net: > >> Kevin, >> >> Try one of these OleDB drivers >> Provider=SQLNCLI >> Provider=SQLOLEDB >> >> hth >> >> Erik >> >> "Kevin" <kdmurphy(a)eircom.net> schreef in bericht >> news:VLEYn.245$K4.100(a)news.indigo.ie... >> > I am working on an application which uses VO2Ado to connect to an SQL >> > Server 2005 database and all was working fine. Now when I start the >> > program in the IDE CAVO crashes with an error message with the options >> > for >> > 'Report' and 'Sorry' and no clue as to where the problem is. I have >> > tried >> > the following and still have the problem: >> > >> > 1. Commented out the line which opens the connection, so that the shell >> > of >> > the app should open. >> > 2. Reindex the project within the IDE. >> > 3. Reindex the project outside the IDE. >> > 4. Export all apps and libs using VOPP then delete the project. Then >> > create a new project and reimport and rebuild the apps. >> > 5. Restarted the computer. >> > >> > Another app in the project that does not use VO2Ado runs fine. The >> > Explorer DataLv sample that comes with VO2Ado runs but does not include >> > the SQL Server Express in the list. I can connect to the database using >> > Microsoft SQL Server Management Studio Express and SQL Master. >> > >> > None of the code in the app that uses VO2Ado has been changed. >> > >> > Can anyone give me any idea of what may have gone wrong or how to fix >> > it? >> > >> > The only changes on my system, software wise that may have an effect >> > are >> > that I installed Vn2Ado to start using Vulcan. I have not yet created a >> > program that uses Vn2Ado to create the connection. >> > >> > The code for opening the connection is below, but as this has not been >> > changed, and commenting out the line that calls it has no affect I >> > cannot >> > see why this might be the problem. >> > >> > Thanks in advance. >> > >> > Kevin >> > >> > method OpenConnection() class StandardShellWindow >> > // >> > // Open ADOConnection >> > // >> > local oConn as ADOConnection >> > local cbErr as codeblock >> > local uError as usual >> > local cConnStr as string >> > local cMsg as string >> > local cError as string >> > local oWB as WarningBox >> > local lOpen as logic >> > >> > // Set error handler >> > cbErr := ErrorBlock( {|oErr| _Break( oErr )}) >> > >> > // Connection string >> > cConnStr := "Provider=MSDASQL;Persist Security Info=False;Data >> > Source=DataSrc;Initial Catalog=DataCar;" >> > >> > begin sequence >> > oConn := AdoConnection{} >> > oConn:ConnectionTimeout := 5 >> > oConn:ConnectionString := cConnStr >> > // setup prompt >> > oConn:Properties:[item, "Prompt"]:Value := AdPromptComplete >> > >> > // Set cursor location >> > oConn:CursorLocation := AdUseClient >> > >> > lOpen := true >> > >> > recover using uError >> > cMsg := "Failed to create connection." + CRLF >> > cMsg += uError:description >> > >> > // Show message >> > oWB := WarningBox{ self, "Open ADOConnection", cMsg } >> > oWB:Show() >> > >> > lOpen := false >> > >> > end sequence >> > >> > if lOpen >> > // Open connectin >> > begin sequence >> > oConn:Open(nil,nil,nil,nil) >> > >> > recover using uError >> > end >> > >> > if oConn:State <> adStateOpen >> > cError := "Failed to open connection." + CRLF >> > >> > // Error occurred >> > if oConn:Errors:Count > 0 >> > // ADO Error >> > cError := oConn:Errors:[item,1]:description >> > elseif IsInstanceOf(uError, #Error) >> > cError := uError:description >> > >> > else >> > cError := "Unknown error" >> > endif >> > >> > oWB := WarningBox{ self, "Open ADOConnection", cError } >> > oWB:Show() >> > >> > else >> > self:Menu:DisableItem( IDM_mnuFuel_Connection_Open_ID ) >> > self:Menu:EnableItem( IDM_mnuFuel_Connection_Close_ID ) >> > self:Menu:EnableItem( IDM_mnuFuel_Connection_Create_Table_ID ) >> > AdoSetConnection( oConn ) >> > >> > endif >> > >> > endif >> > >> > // Restore handler >> > ErrorBlock( cbErr ) >> > >> > return nil >> > >
From: Kevin on 6 Jul 2010 12:28 Erik, It is running local, and that is something I did check even before trying Microsoft SQL Server Manager and SQL Master. I may be wrong but would assume they could cont connect if it was not running. Kevin "ER!k \/!$$ER" <nospam(a)nospam.com> wrote in message news:89h2bkFj7qU1(a)mid.individual.net: > Kevin, > > Is the Sql Service manager running? > Is it installed local? Otherwise, google for network issues on SqlServer > Express. > > Anyway, and you qare right this does not cause your problem, but it does not > make any sense (to me) to access the data via an extra layer Sql-Odbc-OleDB. > > Erik > > > > > > "Kevin" <kdmurphy(a)eircom.net> schreef in bericht > news:5bGYn.246$K4.107(a)news.indigo.ie... > > Erik, > > > > Thanks for your reply. > > > > Microsoft OLE DB Provider for ODBC Drivers > > > > Using the above option in Data Link Properties I can select an ODBC entry > > for the database. > > > > However using > > Microsoft OLE DB Provider for SQL Server > > > > does not list SQL Server Express as it used to. > > > > However, changing the connection string would surely only cause a crash of > > the app when used, rather than the IDE when the program runs, which is > > what happening. > > > > Kevin > > > > > > "ER!k \/!$$ER" <nospam(a)nospam.com> wrote in message > > news:89gnuhFk1vU1(a)mid.individual.net: > > > >> Kevin, > >> > >> Try one of these OleDB drivers > >> Provider=SQLNCLI > >> Provider=SQLOLEDB > >> > >> hth > >> > >> Erik > >> > >> "Kevin" <kdmurphy(a)eircom.net> schreef in bericht > >> news:VLEYn.245$K4.100(a)news.indigo.ie... > >> > I am working on an application which uses VO2Ado to connect to an SQL > >> > Server 2005 database and all was working fine. Now when I start the > >> > program in the IDE CAVO crashes with an error message with the options > >> > for > >> > 'Report' and 'Sorry' and no clue as to where the problem is. I have > >> > tried > >> > the following and still have the problem: > >> > > >> > 1. Commented out the line which opens the connection, so that the shell > >> > of > >> > the app should open. > >> > 2. Reindex the project within the IDE. > >> > 3. Reindex the project outside the IDE. > >> > 4. Export all apps and libs using VOPP then delete the project. Then > >> > create a new project and reimport and rebuild the apps. > >> > 5. Restarted the computer. > >> > > >> > Another app in the project that does not use VO2Ado runs fine. The > >> > Explorer DataLv sample that comes with VO2Ado runs but does not include > >> > the SQL Server Express in the list. I can connect to the database using > >> > Microsoft SQL Server Management Studio Express and SQL Master. > >> > > >> > None of the code in the app that uses VO2Ado has been changed. > >> > > >> > Can anyone give me any idea of what may have gone wrong or how to fix > >> > it? > >> > > >> > The only changes on my system, software wise that may have an effect > >> > are > >> > that I installed Vn2Ado to start using Vulcan. I have not yet created a > >> > program that uses Vn2Ado to create the connection. > >> > > >> > The code for opening the connection is below, but as this has not been > >> > changed, and commenting out the line that calls it has no affect I > >> > cannot > >> > see why this might be the problem. > >> > > >> > Thanks in advance. > >> > > >> > Kevin > >> > > >> > method OpenConnection() class StandardShellWindow > >> > // > >> > // Open ADOConnection > >> > // > >> > local oConn as ADOConnection > >> > local cbErr as codeblock > >> > local uError as usual > >> > local cConnStr as string > >> > local cMsg as string > >> > local cError as string > >> > local oWB as WarningBox > >> > local lOpen as logic > >> > > >> > // Set error handler > >> > cbErr := ErrorBlock( {|oErr| _Break( oErr )}) > >> > > >> > // Connection string > >> > cConnStr := "Provider=MSDASQL;Persist Security Info=False;Data > >> > Source=DataSrc;Initial Catalog=DataCar;" > >> > > >> > begin sequence > >> > oConn := AdoConnection{} > >> > oConn:ConnectionTimeout := 5 > >> > oConn:ConnectionString := cConnStr > >> > // setup prompt > >> > oConn:Properties:[item, "Prompt"]:Value := AdPromptComplete > >> > > >> > // Set cursor location > >> > oConn:CursorLocation := AdUseClient > >> > > >> > lOpen := true > >> > > >> > recover using uError > >> > cMsg := "Failed to create connection." + CRLF > >> > cMsg += uError:description > >> > > >> > // Show message > >> > oWB := WarningBox{ self, "Open ADOConnection", cMsg } > >> > oWB:Show() > >> > > >> > lOpen := false > >> > > >> > end sequence > >> > > >> > if lOpen > >> > // Open connectin > >> > begin sequence > >> > oConn:Open(nil,nil,nil,nil) > >> > > >> > recover using uError > >> > end > >> > > >> > if oConn:State <> adStateOpen > >> > cError := "Failed to open connection." + CRLF > >> > > >> > // Error occurred > >> > if oConn:Errors:Count > 0 > >> > // ADO Error > >> > cError := oConn:Errors:[item,1]:description > >> > elseif IsInstanceOf(uError, #Error) > >> > cError := uError:description > >> > > >> > else > >> > cError := "Unknown error" > >> > endif > >> > > >> > oWB := WarningBox{ self, "Open ADOConnection", cError } > >> > oWB:Show() > >> > > >> > else > >> > self:Menu:DisableItem( IDM_mnuFuel_Connection_Open_ID ) > >> > self:Menu:EnableItem( IDM_mnuFuel_Connection_Close_ID ) > >> > self:Menu:EnableItem( IDM_mnuFuel_Connection_Create_Table_ID ) > >> > AdoSetConnection( oConn ) > >> > > >> > endif > >> > > >> > endif > >> > > >> > // Restore handler > >> > ErrorBlock( cbErr ) > >> > > >> > return nil > >> > > >
|
Next
|
Last
Pages: 1 2 3 Prev: Install Maker for VO2.8 ??? Next: Error Management for VO 2.8 SP3 compatible |