Group:  Microsoft Access ยป microsoft.public.access.devtoolkits
Thread: obtain sql server login name..

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

obtain sql server login name..
nycdon 15.05.2006 19:14:01
how can i obtain in linked A2000 database, the sql server login name for an
audit trail?
thanks!
Re: obtain sql server login name..
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 16.05.2006 08:50:11
Hi,
you can use .Connect property of a linked table:

?CurrentDB.TableDefs("MyTable").Connect

and then parse it

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
[Quoted Text]
> how can i obtain in linked A2000 database, the sql server login name for
> an
> audit trail?
> thanks!

Re: obtain sql server login name..
nycdon 25.07.2006 15:54:02

I didn't seem to get the User login name with that..

"Alex Dybenko" wrote:

[Quoted Text]
> Hi,
> you can use .Connect property of a linked table:
>
> ?CurrentDB.TableDefs("MyTable").Connect
>
> and then parse it
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
>
> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
> > how can i obtain in linked A2000 database, the sql server login name for
> > an
> > audit trail?
> > thanks!
>
>
Re: obtain sql server login name..
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 26.07.2006 12:48:07
hi,
ok, then you are using windows authentication, so you can get window login
name using API:
http://www.mvps.org/access/api/api0008.htm
or using pass-through query against SQL server with SQL:
select SYSTEM_USER

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
news:A9BDD90A-A3F1-4BE5-AAB2-0CDB94054144[ at ]microsoft.com...
[Quoted Text]
>
> I didn't seem to get the User login name with that..
>
> "Alex Dybenko" wrote:
>
>> Hi,
>> you can use .Connect property of a linked table:
>>
>> ?CurrentDB.TableDefs("MyTable").Connect
>>
>> and then parse it
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>>
>> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
>> news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
>> > how can i obtain in linked A2000 database, the sql server login name
>> > for
>> > an
>> > audit trail?
>> > thanks!
>>
>>

Re: obtain sql server login name..
nycdon 26.07.2006 18:50:01
Thanks Alex...how could I get the result of the Pass-thru into a VBA variable?

"Alex Dybenko" wrote:

[Quoted Text]
> hi,
> ok, then you are using windows authentication, so you can get window login
> name using API:
> http://www.mvps.org/access/api/api0008.htm
> or using pass-through query against SQL server with SQL:
> select SYSTEM_USER
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
>
> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> news:A9BDD90A-A3F1-4BE5-AAB2-0CDB94054144[ at ]microsoft.com...
> >
> > I didn't seem to get the User login name with that..
> >
> > "Alex Dybenko" wrote:
> >
> >> Hi,
> >> you can use .Connect property of a linked table:
> >>
> >> ?CurrentDB.TableDefs("MyTable").Connect
> >>
> >> and then parse it
> >>
> >> --
> >> Best regards,
> >> ___________
> >> Alex Dybenko (MVP)
> >> http://alexdyb.blogspot.com
> >> http://www.PointLtd.com
> >>
> >>
> >> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> >> news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
> >> > how can i obtain in linked A2000 database, the sql server login name
> >> > for
> >> > an
> >> > audit trail?
> >> > thanks!
> >>
> >>
>
>
Re: obtain sql server login name..
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 27.07.2006 06:53:38
Hi,
you can open a recordset, based on pass-through query, then rst(0) will
return result of "select SYSTEM_USER"

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

"nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
news:8F9F57D6-FF64-4B19-B82B-58C4A36C733A[ at ]microsoft.com...
[Quoted Text]
> Thanks Alex...how could I get the result of the Pass-thru into a VBA
> variable?
>
> "Alex Dybenko" wrote:
>
>> hi,
>> ok, then you are using windows authentication, so you can get window
>> login
>> name using API:
>> http://www.mvps.org/access/api/api0008.htm
>> or using pass-through query against SQL server with SQL:
>> select SYSTEM_USER
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>>
>> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
>> news:A9BDD90A-A3F1-4BE5-AAB2-0CDB94054144[ at ]microsoft.com...
>> >
>> > I didn't seem to get the User login name with that..
>> >
>> > "Alex Dybenko" wrote:
>> >
>> >> Hi,
>> >> you can use .Connect property of a linked table:
>> >>
>> >> ?CurrentDB.TableDefs("MyTable").Connect
>> >>
>> >> and then parse it
>> >>
>> >> --
>> >> Best regards,
>> >> ___________
>> >> Alex Dybenko (MVP)
>> >> http://alexdyb.blogspot.com
>> >> http://www.PointLtd.com
>> >>
>> >>
>> >> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
>> >> news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
>> >> > how can i obtain in linked A2000 database, the sql server login name
>> >> > for
>> >> > an
>> >> > audit trail?
>> >> > thanks!
>> >>
>> >>
>>
>>

Re: obtain sql server login name..
nycdon 27.07.2006 12:50:01
Thanks Alex!!

"Alex Dybenko" wrote:

[Quoted Text]
> Hi,
> you can open a recordset, based on pass-through query, then rst(0) will
> return result of "select SYSTEM_USER"
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> news:8F9F57D6-FF64-4B19-B82B-58C4A36C733A[ at ]microsoft.com...
> > Thanks Alex...how could I get the result of the Pass-thru into a VBA
> > variable?
> >
> > "Alex Dybenko" wrote:
> >
> >> hi,
> >> ok, then you are using windows authentication, so you can get window
> >> login
> >> name using API:
> >> http://www.mvps.org/access/api/api0008.htm
> >> or using pass-through query against SQL server with SQL:
> >> select SYSTEM_USER
> >>
> >> --
> >> Best regards,
> >> ___________
> >> Alex Dybenko (MVP)
> >> http://alexdyb.blogspot.com
> >> http://www.PointLtd.com
> >>
> >>
> >> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> >> news:A9BDD90A-A3F1-4BE5-AAB2-0CDB94054144[ at ]microsoft.com...
> >> >
> >> > I didn't seem to get the User login name with that..
> >> >
> >> > "Alex Dybenko" wrote:
> >> >
> >> >> Hi,
> >> >> you can use .Connect property of a linked table:
> >> >>
> >> >> ?CurrentDB.TableDefs("MyTable").Connect
> >> >>
> >> >> and then parse it
> >> >>
> >> >> --
> >> >> Best regards,
> >> >> ___________
> >> >> Alex Dybenko (MVP)
> >> >> http://alexdyb.blogspot.com
> >> >> http://www.PointLtd.com
> >> >>
> >> >>
> >> >> "nycdon" <nycdon[ at ]discussions.microsoft.com> wrote in message
> >> >> news:B1542807-E4BD-4287-923B-2FD742B8BD8F[ at ]microsoft.com...
> >> >> > how can i obtain in linked A2000 database, the sql server login name
> >> >> > for
> >> >> > an
> >> >> > audit trail?
> >> >> > thanks!
> >> >>
> >> >>
> >>
> >>
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net