Line number for errors

I'm connecting to ASE through ODBC. I execute queries SQLExecDirect and 
track errors with SQLGetDiagRec. How can I get extra information about 
the error like the line number and possibly a procedure name that the 
error occurred in.

SQL Server has some additional SQLGetDiagField parameters:

http://msdn.microsoft.com/en-us/library/aa177877%28SQL.80%29.aspx


Is there something for ASE?

0
Brad
6/13/2010 12:34:01 AM
sybase.connectivity.odbc 1822 articles. 0 followers. Follow

4 Replies
380 Views

Similar Articles

[PageSpeed] 19

Hi Brad,

Our implementation of the driver supports some of the returns from the 
SQLGetDiagField.  (SQLGetDiagRec has some limitations but you can retrieve 
multiple messages).

We do return:

  SQL_DIAG_NATIVE:
  SQL_DIAG_CLASS_ORIGIN:
  SQL_DIAG_CONNECTION_NAME:
  SQL_DIAG_MESSAGE_TEXT:
  SQL_DIAG_SERVER_NAME:
  SQL_DIAG_SQLSTATE:
  SQL_DIAG_SUBCLASS_ORIGIN:

I thouhgt we would work with SQL_DIAG_DYNAMIC_FUNCTION but this doesn't seem 
to work - I think this would bring back the command executed.

We don't have something to return line #'s, but this would make a good 
enhancement.

If you want you can pursue all this by logging a tech support case with 
Sybase to have this investigated further.

Thank you,

-Paul

"Brad Wery [TeamSybase]" <bradweryATgmail.com> wrote in message 
news:4c142779$1@forums-1-dub...
> I'm connecting to ASE through ODBC. I execute queries SQLExecDirect and 
> track errors with SQLGetDiagRec. How can I get extra information about the 
> error like the line number and possibly a procedure name that the error 
> occurred in.
>
> SQL Server has some additional SQLGetDiagField parameters:
>
> http://msdn.microsoft.com/en-us/library/aa177877%28SQL.80%29.aspx
>
>
> Is there something for ASE?
> 


0
Paul
6/14/2010 8:25:33 PM
It would be a great feature to have. I would open a case for this but it 
won't help me. Would I be able to distribute the ODBC driver with my 
application? If not, it would do me no good.



On 6/14/2010 3:25 PM, Paul Vero [Sybase] wrote:
> Hi Brad,
>
> Our implementation of the driver supports some of the returns from the
> SQLGetDiagField.  (SQLGetDiagRec has some limitations but you can retrieve
> multiple messages).
>
> We do return:
>
>    SQL_DIAG_NATIVE:
>    SQL_DIAG_CLASS_ORIGIN:
>    SQL_DIAG_CONNECTION_NAME:
>    SQL_DIAG_MESSAGE_TEXT:
>    SQL_DIAG_SERVER_NAME:
>    SQL_DIAG_SQLSTATE:
>    SQL_DIAG_SUBCLASS_ORIGIN:
>
> I thouhgt we would work with SQL_DIAG_DYNAMIC_FUNCTION but this doesn't seem
> to work - I think this would bring back the command executed.
>
> We don't have something to return line #'s, but this would make a good
> enhancement.
>
> If you want you can pursue all this by logging a tech support case with
> Sybase to have this investigated further.
>
> Thank you,
>
> -Paul
>
> "Brad Wery [TeamSybase]"<bradweryATgmail.com>  wrote in message
> news:4c142779$1@forums-1-dub...
>> I'm connecting to ASE through ODBC. I execute queries SQLExecDirect and
>> track errors with SQLGetDiagRec. How can I get extra information about the
>> error like the line number and possibly a procedure name that the error
>> occurred in.
>>
>> SQL Server has some additional SQLGetDiagField parameters:
>>
>> http://msdn.microsoft.com/en-us/library/aa177877%28SQL.80%29.aspx
>>
>>
>> Is there something for ASE?
>>
>
>

0
Brad
6/14/2010 8:32:36 PM
Hi Brad,

It all depends on your licensing - how did you get the ASE/Driver?  Did you 
purchase it with
license?  Usually you receive runtime license - how did you get the driver?

-Paul

"Brad Wery [TeamSybase]" <bradweryatgmail.com> wrote in message 
news:4c1691e4$1@forums-1-dub...
> It would be a great feature to have. I would open a case for this but it 
> won't help me. Would I be able to distribute the ODBC driver with my 
> application? If not, it would do me no good.
>
>
>
> On 6/14/2010 3:25 PM, Paul Vero [Sybase] wrote:
>> Hi Brad,
>>
>> Our implementation of the driver supports some of the returns from the
>> SQLGetDiagField.  (SQLGetDiagRec has some limitations but you can 
>> retrieve
>> multiple messages).
>>
>> We do return:
>>
>>    SQL_DIAG_NATIVE:
>>    SQL_DIAG_CLASS_ORIGIN:
>>    SQL_DIAG_CONNECTION_NAME:
>>    SQL_DIAG_MESSAGE_TEXT:
>>    SQL_DIAG_SERVER_NAME:
>>    SQL_DIAG_SQLSTATE:
>>    SQL_DIAG_SUBCLASS_ORIGIN:
>>
>> I thouhgt we would work with SQL_DIAG_DYNAMIC_FUNCTION but this doesn't 
>> seem
>> to work - I think this would bring back the command executed.
>>
>> We don't have something to return line #'s, but this would make a good
>> enhancement.
>>
>> If you want you can pursue all this by logging a tech support case with
>> Sybase to have this investigated further.
>>
>> Thank you,
>>
>> -Paul
>>
>> "Brad Wery [TeamSybase]"<bradweryATgmail.com>  wrote in message
>> news:4c142779$1@forums-1-dub...
>>> I'm connecting to ASE through ODBC. I execute queries SQLExecDirect and
>>> track errors with SQLGetDiagRec. How can I get extra information about 
>>> the
>>> error like the line number and possibly a procedure name that the error
>>> occurred in.
>>>
>>> SQL Server has some additional SQLGetDiagField parameters:
>>>
>>> http://msdn.microsoft.com/en-us/library/aa177877%28SQL.80%29.aspx
>>>
>>>
>>> Is there something for ASE?
>>>
>>
>>
> 


0
Paul
6/17/2010 10:03:46 PM
I'm using the developer edition of ASE. It's for development purposes 
only so I don't think I can distribute anything.




On 6/17/2010 5:03 PM, Paul Vero [Sybase] wrote:
> Hi Brad,
>
> It all depends on your licensing - how did you get the ASE/Driver?  Did you
> purchase it with
> license?  Usually you receive runtime license - how did you get the driver?
>
> -Paul
>
> "Brad Wery [TeamSybase]"<bradweryatgmail.com>  wrote in message
> news:4c1691e4$1@forums-1-dub...
>> It would be a great feature to have. I would open a case for this but it
>> won't help me. Would I be able to distribute the ODBC driver with my
>> application? If not, it would do me no good.
>>
>>
>>
>> On 6/14/2010 3:25 PM, Paul Vero [Sybase] wrote:
>>> Hi Brad,
>>>
>>> Our implementation of the driver supports some of the returns from the
>>> SQLGetDiagField.  (SQLGetDiagRec has some limitations but you can
>>> retrieve
>>> multiple messages).
>>>
>>> We do return:
>>>
>>>     SQL_DIAG_NATIVE:
>>>     SQL_DIAG_CLASS_ORIGIN:
>>>     SQL_DIAG_CONNECTION_NAME:
>>>     SQL_DIAG_MESSAGE_TEXT:
>>>     SQL_DIAG_SERVER_NAME:
>>>     SQL_DIAG_SQLSTATE:
>>>     SQL_DIAG_SUBCLASS_ORIGIN:
>>>
>>> I thouhgt we would work with SQL_DIAG_DYNAMIC_FUNCTION but this doesn't
>>> seem
>>> to work - I think this would bring back the command executed.
>>>
>>> We don't have something to return line #'s, but this would make a good
>>> enhancement.
>>>
>>> If you want you can pursue all this by logging a tech support case with
>>> Sybase to have this investigated further.
>>>
>>> Thank you,
>>>
>>> -Paul
>>>
>>> "Brad Wery [TeamSybase]"<bradweryATgmail.com>   wrote in message
>>> news:4c142779$1@forums-1-dub...
>>>> I'm connecting to ASE through ODBC. I execute queries SQLExecDirect and
>>>> track errors with SQLGetDiagRec. How can I get extra information about
>>>> the
>>>> error like the line number and possibly a procedure name that the error
>>>> occurred in.
>>>>
>>>> SQL Server has some additional SQLGetDiagField parameters:
>>>>
>>>> http://msdn.microsoft.com/en-us/library/aa177877%28SQL.80%29.aspx
>>>>
>>>>
>>>> Is there something for ASE?
>>>>
>>>
>>>
>>
>
>

0
Brad
6/22/2010 1:43:15 PM
Reply:

Similar Artilces:

ODBC error: external error, while testing an ODBC connection to an ASE server
"The connection failed because of invalid or missing external configuration data." Does this have to do with the configuration of OCS-12_0 or the ocscfg.exe? Running ocscfg.exe, I've set the "SYBASE:" directory to "C:\sybase" but it doesn't seem to like it when I set the "Sybase_OCS:" to "C:\sybase\OCS-12_0". I don't know if this is related. Another idea - on the install I chose "No" to updating the msvcrt.dll (the MS C Runtime) because I've seen that hose a system before. Is this file safe to overwrite and ca...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

Display the error line number in case of an error
Hi, i was wandering if there is a way I can display the whole stack trace of my pb app in case of an error. For the time being I do it using the populate error function, but this indicates that I should call the populateerrror() function each time I expect an error to occur. I have compined DB and System errors to a single user_object so each time I get a DB error i have to have previously called the populateerror() function, or else I don't get the proper line number of the error. I am considering any function or Win API call that could allow me to print the stack trac...

show the line number of the error in the error log file
Hi ,Is there any way to show the line number of the error in the error log file of asp.net?It gives the line number when it runs  locally, but not when it runs from the server <b>Error Caught in Page_Error event</b><hr><br><br><b>Error in: </b>http://LRDDEV-05/Testpage/SearchAgent.aspx<br><b>Error Message: </b>Object reference not set to an instance of an object.<br><b>Stack Trace:</b><br>   at Testpage.SearchAgent.Page_Error(Object sender, EventArgs e)   at System.Web.UI.TemplateCon...

Line number, column number not displayed in error list
I'm using visual studio 2008 to migrate a projecty from asp.net 1.1 to 2.0. Things were working fine, I was slowly working through the errors. However now the error list has stopped showing line numbers and columns, meaning all I know about an error is the file containing it, making debugging pretty much impossible!Any idea what's causing this, or any suggestions on how to fix this?thanks for your help! They might not be selected to show (right click on column headers, and check under Show Columns).Richard  right click in the error list--> show columns and make sure that...

[connect error] Interbase Connect Error
In ODBC connect test is successfully.. but in PowerBuilder 6.5 Database Profiles is displayed error message.. Error Message is SQLSTATE = 40001 [Easysoft][Interbase]Dynamic SQL Error, SQL error code = -91, feature is not supported What means this message? Now I use PowerBuilder 6.5 & Interbase 5.6... Just I choose - Profile Name - Data Source --> This is ODBC DNS..(user DNS) - User ID - Password Does it need more? ...

Add Error Line Number to Release Mode Error Exception?
Anyone know of a way to grab the line number that the error occured on in the Release version of the error exception?  It shows up in Debug and not in Release (for speed reasons). Thanks, RichRichhttp://www.DevAndDesign.com/ Hey Rich, You should take a look at this.Nils GrusonMicrosoft .NET Consultant (MCPD)LogicaYou don't have to be sick to get better.Please remember to click “Mark as Answer” on the post that helped you keep your job. That was very helpful - thanks!Richhttp://www.DevAndDesign.com/...

error reporting
I have a global error handler deinfed in my, where Im using  Server.GetLastError();Then printing the exception.  Sometimes I get the page it happens on along with a line number, sometimes I dont.  How can I always ensure that Im getting the line number and aspx file name that the error originated from ?  Will this example always get me the original aspx filename and line number where the error originated ?http://www.developer.com/net/asp/article.php/961301  you might put try-catch around areas that are particularily problem children.. in your catch block, you co...

ODBC Connection error using IIS 5 and MS Access ODBC
Completely new at this so please forgive my ignorance! I have an app running on IIS 5 and 6 that when connecting to a SQL Db (via ODBC) app runs fine; however when switching to a local MS Access Db, application fails, generating the following message: "<?xml version="1.0" encoding="utf-8" ?>   FAIL - ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Disk or network error. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Disk or network error.</string&...

ODBC connection errors
Hello, We're using PB C4 components on EAServer 3.5 C4 on NT Server 4.0. Connection caches connect to MS SQL Server 6.5 databases using ODBC. MDAC version is 3.51. Our DBA takes the DB down for routine maintenance a few nights in the week by disconnecting all users. When the DB is brought back up, we find hanging connection caches. The EAServer runtime monitoring of the caches indicate negative numbers for "Active Connections". We then begin to encounter the following error sporadically whenever client sessions attempt to access the database. ---------------------...

Error line number ...
I hate to see ASP.Net errora, ( not because it is an error ) In classic asp i used to get the line number every time an error occured, but in asp.net many a times i get erros like 'Object reference not set to an instance of an object. ... Null Exceptions ' etc with no line number. the error is hard to find if code if 100's of lines Is there a way i can get the exact line number ... i hope there is some web.config setting for this... You can get the line number from the stacktrace. Normally, if an ASP.NET page crashes due to a bug, you'll get a portion of the code that contains the e...

UpdatePanel related javascript error: Unknown runtime error: Line number 11245
Whilst developing within Atlas UpdatePanels we've twice come across the following error following autopostback on standard WebControls. Actually the error seems to sneak up onus, meaning that the control will postback perfectly well - Atlas enabled - then breaks a little down the line. The javascript error message is: #########################################Line: 11245Char: 17Error: Unknown runtime errorCode: 0Url: http:/localhost:1084/theWebPage/aspx######################################### Line 11245 is not a line in the resulting HTML source, so we've no idea where this err...

Connection Error in ODBC
I have the next error: [SYBASE][ODBC Sybase driver][Sybase] ct_connect()> user api Layer: Client Library error: error string not available. The Sybase Client is 12.0 and the Server is 12.0. The S.O. is Windows 2000 or XP ..... Can send me anything... for this problem..!!!!!!! Thanks... Sergio_Blanco wrote... > I have the next error: > > [SYBASE][ODBC Sybase driver][Sybase] ct_connect()> user api Layer: Client > Library error: error string not available. > > The Sybase Client is 12.0 and the Server is 12.0. > The S.O. is Windows 2000 or X...

odbc connection error
// Profile EAS Demo DB V110 SQLCA.DBMS = "ODBC" SQLCA.AutoCommit = False I wrote a db connection with the default connection I test it in DB PROFILE,it's ok but when i copy it to the program,then it can't connect the db please help me solving it,thx!!! application,open event: SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB V110;UID=dba;PWD=sql'" IF SQLCA.SQLCode = -1 THEN MessageBox("SQL error", SQLCA.SQLErrText) END IF Did you add Connect using SQLCA; before the IF....END IF statement? <sweet> wrote in me...

Web resources about - Line number for errors - sybase.connectivity.odbc

Number - Wikipedia, the free encyclopedia
A number is a mathematical object used to count , label, and measure . In mathematics , the definition of number has been extended over the years ...

Number - Wikipedia, the free encyclopedia
A number is a mathematical object used to count , label, and measure . In mathematics , the definition of number has been extended over the years ...

Star Wars by the numbers: Why Disney scored the deal of the century
Some thought Disney paid through the nose when it bought Lucasfilm in 2012, but it just might have been the bargain of the century.

Primary children accused of using stolen credit card numbers
Children from a primary school in Melbourne's north-west have been accused of using stolen credit card numbers to make thousands of dollars worth ...

Google Wallet gains ability to send money to any contact using just a phone number
While Google has shifted its focus to Android Pay for contactless payments, Google Wallet has needed to reinvent itself somewhat as a peer-to-peer ...

Google Wallet for iOS can now send money to any contact using just a phone number
... you send money to anyone on your contact list, even if you don’t have their email address. You can send money to them using their phone number, ...

The Force Awakens ABC and ESPN; Star Wars By the Numbers
If you’ve watched anything on ABC or ESPN in the past few weeks, you’ve been inundated with cross promotion for Disney’s upcoming Star Wars: ...

SEC Heisman history by the numbers: Will Derrick Henry become league's 12th ...
SEC Heisman history by the numbers: Will Derrick Henry become league's 12th ... AL.com Auburn QB Pat Sullivan and Florida QB Danny Wuerffel ...

ISIL is GCC's 'number one threat'
A clear strategy to fight ISIL and dialogue with Iran are among key challenges facing GCC, Gulf analysts tell Al Jazeera

Adobe Jumps 5%: FYQ4 Beats, Year View Light; Citi Cheers Sub Numbers
Shares of content creation software vendor Adobe Systems ( ADBE ) are up $4.51, or 5%, at $93.47, in late trading, after the company this afternoon ...

Resources last updated: 12/13/2015 12:23:14 AM