VoiceGuide IVR Software Main Page
Jump to content

Database Query Problem

Recommended Posts

When I use Database Query module in my script,the call will hangup immediately.

I checked the log file,and find some errors.But I don't konw what cause this.

could you give me some adives to solve this problem

 

SQL Server 2000

VoiceGuide 7.1

0904_1213_vgEngine.txt

0904_ktTel.txt

Share this post


Link to post

It looks like you are trying to connect to a SQLServer the database using ODBC, but the ODBC connection attempt is failing with error [iM002]

 

Error [iM002] means: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

 

 

Have you tried using the ADO.NET connection method? Examples can be found in VoiceGuide Help file: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm

 

 

121454.250  6   3   1 state [Query Tel] DB Query
121454.250  6   3   1       db    strDatabaseName=[] strDbConnectString=[Driver={SQL Server Native Client 10.0};Server=127.0.0.1;Database=zhangmin;Uid=sa;Pwd=zhangmin;] sAdoNetFactoriesAvailable=[|System.Data.Odbc|System.Data.OleDb|System.Data.OracleClient|System.Data.SqlClient|Microsoft.SqlServerCe.Client|System.Data.SQLite|]
121454.250  6   3   1       db    using ado.net ODBC data provider : OdbcConnection/OdbcCommand/etc
121454.250  6   3   1 t     timer set   30 sec : EV_TIMEOUT_HANGUP
121454.250  6   3   1       db    odbc  RunQuery_Odbc [Query Tel], db=[], connect=[Driver={SQL Server Native Client 10.0};Server=127.0.0.1;Database=zhangmin;Uid=sa;Pwd=zhangmin;], sql=[select nameID from T_carsale where name='zhangmin']
121454.250  6   3   1       db    odbc  thread init (threadpool)
121454.250  6   3   1       db    odbc  thread started (threadpool)
121454.343 16   3   1       db    odbc  connection create call.
121454.343 19   3   1 ev    PlayEnd 3 436515
121454.343 19   3   1       play  end   id=436515, (current ID)
121454.343 19   3   1       q scr add   evScriptEvent 8001 EV_PLAY_FINISHED
121454.343  6   3   1       q scr run   evScriptEvent sCode=[EV_PLAY_FINISHED] iActionID=0, crn=0[436515|0|0|0|0][|||||] 2|00:00:00.1250000
121454.343  6   3   1       scriptevent EV_PLAY_FINISHED  436515|0|0  ||
121454.359  6   3   1       LsDbQuery EV_PLAY_FINISHED,EV_PLAY_FINISHED
121454.359 16   3   1       db    odbc  connection open call.
121454.671 16   3   1 ERROR v7.3.4538.25968 (2012-06-04 13:25:36.57) ConnectAndRun_Odbc init : ERROR [iM002] [Microsoft][ODBC ???????] ????????????????????

  ? System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
  ? System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
  ? System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
  ? System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
  ? System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
  ? System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  ? System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  ? System.Data.Odbc.OdbcConnection.Open()
  ? ..()
121454.671 16   3   1       oVgmDbQuery_AdoNetCommon_Completed SqlQueryType=ERROR, RowsCount=0, sRv=
121454.671 16   3   1       oVgmDbQuery_AdoNetCommon_Completed strError=ERROR [iM002] [Microsoft][ODBC ???????] ????????????????????
121454.671 16   3   1       path {ERROR [iM002] [Microsoft][ODBC ???????] ????????????????????} not found

Share this post


Link to post

The attached traces and scripts do not show an ADO.NET connection attempt.

 

Both scripts and traces show ODBC method used on both calls.

 

Please post trace and script showing ADO.NET connection attempt.

 

 

114734.031  6   3   1 state [GetID] DB Query
114734.031  6   3   1       db    strDatabaseName=[] strDbConnectString=[Driver={SQL Server Native Client 10.2};Server=11111;Database=zhangmin;Uid=sa;Pwd=zhangmin;] sAdoNetFactoriesAvailable=[|System.Data.Odbc|System.Data.OleDb|System.Data.OracleClient|System.Data.SqlClient|System.Data.SQLite|]
114734.031  6   3   1       db    using ado.net ODBC data provider : OdbcConnection/OdbcCommand/etc
114734.031  6   3   1 t     timer set   30 sec : EV_TIMEOUT_HANGUP
114734.031  6   3   1       db    odbc  RunQuery_Odbc [GetID], db=[], connect=[Driver={SQL Server Native Client 10.2};Server=11111;Database=zhangmin;Uid=sa;Pwd=zhangmin;], sql=[select nameID from T_carsale where name='zhangmin']
114734.031  6   3   1       db    odbc  thread init (threadpool)
114734.031  6   3   1       db    odbc  thread started (threadpool)
114734.046  4   3   1       db    odbc  connection create call.
114734.046  4   3   1       db    odbc  connection open call.
114734.203  4   3   1 ERROR v7.3.4538.25968 (2012-06-04 13:25:36.57) ConnectAndRun_Odbc init : ERROR [iM002] [Microsoft][ODBC ???????] ????????????????????



114747.453  6   3   1 state [GetID] DB Query
114747.453  6   3   1       db    strDatabaseName=[] strDbConnectString=[Driver={SQL Server Native Client 10.2};Server=11111;Database=zhangmin;Uid=sa;Pwd=zhangmin;] sAdoNetFactoriesAvailable=[|System.Data.Odbc|System.Data.OleDb|System.Data.OracleClient|System.Data.SqlClient|System.Data.SQLite|]
114747.453  6   3   1       db    using ado.net ODBC data provider : OdbcConnection/OdbcCommand/etc
114747.453  6   3   1 t     timer set   30 sec : EV_TIMEOUT_HANGUP
114747.453  6   3   1       db    odbc  RunQuery_Odbc [GetID], db=[], connect=[Driver={SQL Server Native Client 10.2};Server=11111;Database=zhangmin;Uid=sa;Pwd=zhangmin;], sql=[select nameID from T_carsale where name='zhangmin']
114747.453  6   3   1       db    odbc  thread init (threadpool)
114747.453  6   3   1       db    odbc  thread started (threadpool)
114747.453  4   3   1       db    odbc  connection create call.
114747.453  4   3   1       db    odbc  connection open call.
114747.453  4   3   1 ERROR v7.3.4538.25968 (2012-06-04 13:25:36.57) ConnectAndRun_Odbc init : ERROR [iM002] [Microsoft][ODBC ???????] ????????????????????

Share this post


Link to post

Trace shows that attempted connection to SQL Server times out with "error 40", which means "Could not open a connection to SQL Server"

 

Have you confirmed that this database can be accessed remotely? You usually need to edit SQLServer config to enable remote access (tcp/ip) and ensure that any firewalls etc. do not block the communications.

 

124348.218  6   3   1 state [GetID] DB Query
124348.218  6   3   1       db    strDatabaseName=[system.Data.SqlClient] strDbConnectString=[Data Source=10.1.1.4;Initial Catalog=Main;User Id=sa;Password=zhangmin] sAdoNetFactoriesAvailable=[|System.Data.Odbc|System.Data.OleDb|System.Data.OracleClient|System.Data.SqlClient|System.Data.SQLite|]
124348.218  6   3   1       db    using ado.net data provider factory.
124348.218  6   3   1 t     timer set   30 sec : EV_TIMEOUT_HANGUP
124348.218  6   3   1       db    fctry RunQuery_AdoNetFactory GetID, System.Data.SqlClient, Data Source=10.1.1.4;Initial Catalog=Main;User Id=sa;Password=zhangmin, select nameID from T_carsale where name='zhangmin'
124348.218  6   3   1       db    fctry thread init (threadpool)
124348.218  6   3   1       db    fctry thread started (threadpool)
124348.250 16   3   1       db    fctry connection create call.
124348.296 16   3   1       db    fctry connection open call.

124430.765 16   3   1 ERROR v7.3.4538.25968 (2012-06-04 13:25:36.57) ConnectAndRun_AdoNetFactory : ????? SQL Server ????????????????????????????????????????????? SQL Server ???????????? (provider: ????????, error: 40 - ????? SQL Server ???)

  ? System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×