I am trying to debug the scope_Identity() call in qt. To elaborate on that scope_identity supposed to return the sessions last inserted data ID, but this call does not work accordingly in Qt database calls. I am trying to figure if this returns a value from the database driver to Qt codes at all and at this point I manage to track the code executions to
bool QODBCResult::reset (const QString& query)
method in qsql_odbc.cpp class.
In this method it accesses some win32 __stdcall calls, one of which I believe is responsible in connecting and retrieving data from the database.
SQLSetStmtAttr
SQLAllocHandle
SQLExecDirect
I am unable to find the code for these and I appreciate if someone can guide me on this.
Thank you very much in advance.
Did you try to ask your favorite search engine? Perhaps it would guide you to the MSDN documentation pages (e.g. for SQLExecDirect) or to this question on stackoverflow: scope_identity vs ident_current that may contain an answer to your troubles.
Related
I’ve got a database in PostgreSQL containing GeoData,
and I need to invoke PostGIS functions such as ST_AsGeoJSON, ST_AsText etc. using the lucid ORM but can’t seem to find a way around.
Can anybody provide me with any example or docs related to it ?
Thanks,
Does anyone know when the getSchema function is called, or what calls it?
For that matter does anyone know of any documentation that outlines the flow between the Google Data Studio Connector functions.
So I think I can answer my own question, but if anyone can add any clarification that would still be welcome.
It appears that this function provides the full list of connector fields, specifically when the connector is connected to a data source.
It may be called at other points as well which where some further clarification would be useful.
getSchema() is called by Data Studio when Data Studio needs to know the schema. This usually happens 1) right after you complete the configuration for a community connector or 2) when you are editing a data source in Data Studio and reconnect to it.
I am working on an old piece of Software using a SQL Server database (let's call it DB A) with loads of interconnections to other DB. One of this other other DB (DB B) will be removed soon and I have two functions in my DB A who access this DB.
So I would like to know how and where I can get the info whether these functions are still in use. And if yes, who/what uses it ?
Thx in advance for the help.
I do not think this is possible for functions. I know it is for stored procedures but not functions
If you're using the functions from stored procedures, other functions, views etc., you should be able to find them from sys.sql_modules. If it's in your C# etc. code, then you'll probably have to look into your version control.
I'm having huge difficulty debugging database operations from Silverlight RIA. This is understandable, I suppose, since database operations are abstracted by about 3 layers of services and ORM and stuff, but is there any way I can see what the database is telling me regarding the issue? I'm able to find an EntityConflict object which doesn't offer much information.
The only field which seems to indicate any problem is "IsDeleted" property equal to true, however this property is not well documented at MSDN and I cannot even be sure that having it be true is an issue.
I've attempted to use fiddler, however no errors are reaching that, I've attached to the application's unhadled exception, but that points me back to EntityConflict, which I am recovering through handling SubmittedChanges event and accessing the args. I've even enabled WCF tracing to attempt to recover some information but, of course, nothing there either.
Did you inspect SubmitOperation.Error after the submit operation failed? It should contain the error information you seek. More information on error handling can be found here: Link
The issue was a known issue, at least a few years ago, where INSTEAD OF INSERT doesn't return Scope_identity for a column inserted by this method. EF uses this value to verify that an insert was completed. When it fails, you get a deletion conflict. This is, apparently, a known issue with the SQL Server EF provider, however I have been unable to confirm that it's been resolved.
Last night one of our SQL servers developed some major problems and after a colleague stopped, started, and all the usual things it started checking and rebuilding databases and is now running an extended stored procedure called "xp_qv".
The internet seems to be very short of information on what this procedure does or anythign like that so I was hoping somebody here might be able to help.
I should add that I assume it is meant to be running so the question isn't "Can I stop it" or anything like that, its just curiosity in what it is doing in the hope that it will help determine how long before things are usable again...
This is the only information I could find..
xp_qv, hosted in xpsqlbot.dll is a
wrapper around functionality in
sqlboot.dll, which returns information
about the SKU type, licensing etc It
is not documented that is why you can
not find a reference.