RE: two sql statement questions



Hi Dave,

As far as I know, SELECT TOP is a standard SQL statement, and can be run on
every database engine. So, even if you're connecting to a database through
ODBC, you can use this syntax.

The refresh dataset process is actually utilizing the feature that SQL
server supports multiple SQL statements execution. However, there are some
issues that prevents this realize with ODBC.

1. Not all database supports multiple SQL statements.
2. Getting the last inserted identity is unique with each database.

If you're trying to run this from ODBC, and you do know what statement can
get the identity, you can put the insert statement and this in 2
OdbcCommand and make the 2 command in one Transaction. Which will help you
achieve this.

HTH.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

.



Relevant Pages

  • RE: two sql statement questions
    ... I think we're stuck having to write code for each database we support. ... As far as I know, SELECT TOP is a standard SQL statement, and can be run on ... Not all database supports multiple SQL statements. ...
    (microsoft.public.data.odbc)
  • RE: Database Deployment ?
    ... I don't see I can reverse engine a Database in Visual Studio. ... SQL Server, e.g. stored procedures, functions, triggers and etc. ... Microsoft Online Community Support ... Engineer within 1 business day is acceptable. ...
    (microsoft.public.vsnet.general)
  • RE: Problem with UTF8 and Default Roles
    ... Problem with UTF8 and Default Roles ... use dbschema on a UTF8 database that contains default roles. ... tell the engineer about it and eventually ... According to our support engineer, they've reproduced it at IBM and are ...
    (comp.databases.informix)
  • Re: Suggestions on multiple database support
    ... However, as far as writing the actual SQL statements, I don't know if there ... doesn't support them, so right there you have a problem. ... products only support one database as the backend. ... > ways to support multiple database types? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: what tools/procedures can be used for developping databases?
    ... I am looking for documentation and best practices to develop a database and support it. ... generate SQL statements to create an empty database for a specific version ... prevent performing "database patches" in an incorrect order or multiple execution of a specific patch ...
    (comp.databases.theory)