Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #5425

Re: Ado SQL UniqueIdentifier

From Carlos Rocha <FreeTheMusic@ascap.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Ado SQL UniqueIdentifier
Date 2013-06-30 18:27 +0100
Organization albasani.net
Message-ID <kqpps7$e1b$1@news.albasani.net> (permalink)
References <d3e8bbdc-b02f-4fca-a5af-2422241a67fc@googlegroups.com> <8b8c5e4d-21e6-4fc6-b955-0603e7c5904f@googlegroups.com>

Show all headers | View raw


Rob van Erk explained on 30-06-2013 :

Hi Rob,

> Sorry guys, long time I have been working with vO (what a shame.... :-) and I 
> do not understand how to get this fixed. Erik mentions I can use:
>
> SELECT scope_identity()" 
>
> but running this I get a "NILL". My Unid has primary key in SQL2005 Server. 
> So, I use something like:
>
> insert into dbtimereg (username,logindate,logintime,logoffdate,logofftime, 
> pc,citrix,pcname) 
> values('rob','300613','1800','300613','2100','PC1','No','JDKLSDW');SELECT 
> scope_identity()'
>
> The record is just added, a unique identifier does exist in Unid field and I 
> would directly would like to get the Unid value back in a string value.
>
> The requery does not seem to work and I hoped I could used some RETURN value 
> in the SQL Statement but this does also not work.
>

I don't know SQL Server, but in any SQL engine a select statement 
returns a recordset, so your answer should be in the recordset returned 
by SELECT scope_identity()

-- 
Carlos Rocha

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Ado SQL UniqueIdentifier Rob van Erk <erk.v@hotmail.com> - 2013-06-30 02:55 -0700
  Re: Ado SQL UniqueIdentifier "Er!k \\/!$$Er" <nospam@nospam.url> - 2013-06-30 16:01 +0200
  Re: Ado SQL UniqueIdentifier "andrej Terkaj" <aterkaj@task.si> - 2013-06-30 16:04 +0200
  Re: Ado SQL UniqueIdentifier Rob van Erk <erk.v@hotmail.com> - 2013-06-30 10:15 -0700
    Re: Ado SQL UniqueIdentifier Carlos Rocha <FreeTheMusic@ascap.com> - 2013-06-30 18:27 +0100
    Re: Ado SQL UniqueIdentifier "Er!k \\/!$$Er" <nospam@nospam.url> - 2013-07-01 08:31 +0200
  Re: Ado SQL UniqueIdentifier Rob van Erk <erk.v@hotmail.com> - 2013-07-01 12:33 -0700

csiph-web