Showing posts with label automatically. Show all posts
Showing posts with label automatically. Show all posts

Friday, March 9, 2012

ODBC

Hi,
Using VB.NET how can I deploy ODBC connection to automatically install when
the package is installed?
YamaConsider using a DSN-less connection. Then there is nothing to distribute.
313295 HOW TO: Use the Server Name Parameter in a Connection String to
Specify
http://support.microsoft.com/?id=313295
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Thanks Kevin,
But I had to create the ODBC package for my company legacy program written
in FoxPro!!!
Using InstallShield I was able to distribute the ODBC.
I wrote to the registry the following:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\myDSNName]
"Driver"= %windir% + "\\system32\\SQLSRV32.dll"
"Server"="myServer"
"Database"="myDatabase"
"LastUser"="sa"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"myDSNName"="SQL Server"
Thank you,
Yama
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:RWwjZsL1DHA.3564@.cpmsftngxa07.phx.gbl...
quote:

> Consider using a DSN-less connection. Then there is nothing to

distribute.
quote:

> 313295 HOW TO: Use the Server Name Parameter in a Connection String to
> Specify
> http://support.microsoft.com/?id=313295
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

Wednesday, March 7, 2012

Obtaining count for identity

Is there a way to query a SQL server such that it will return the
current counter value of a field that increments automatically (an
identity field)? Using a MAX query might not necessarily give you the
correct information because it is possible that the high value records
were deleted. I checked the system tables and none of them appear to
have what I need. I suppose it would be possible to maintain a table
that lists all the incrementing columns, but ideally there would be a
way already built into SQL Server.

Thanks.On 15 Jun 2005 14:00:46 -0700, hartley_aaron@.hotmail.com wrote:

>Is there a way to query a SQL server such that it will return the
>current counter value of a field that increments automatically (an
>identity field)? Using a MAX query might not necessarily give you the
>correct information because it is possible that the high value records
>were deleted. I checked the system tables and none of them appear to
>have what I need. I suppose it would be possible to maintain a table
>that lists all the incrementing columns, but ideally there would be a
>way already built into SQL Server.
>Thanks.

Hi hartley_aaron,

Look up IDENT_CURRENT in Books Online.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||Look up IDENT_CURRENT or @.@.IDENTITY in Books Online.

HTH,
Stu|||It worked great.

Thank you both!