Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Friday, March 23, 2012

Related to Auto Increament

Hello EveryOne,

I have a program which insert the Data into table Fine. But the problem is that whenever expecption is raised the auto increament id is increases..
i want that user enter the record and without error the auto increament id is 1 and when second user enter the record on table and exception raised and next time he entered again then his record auto increament id is 3 why? But record is not entered only the expecption is raised.

How to resolve this problem to make cosistency in record of other tables.? Help me

Because the database had already obtained the identity value before the exception was encountered. Identity fields are not guaranteed to be consecutive, nor are they necessarily guaranteed to be increasing (although I have never seen a situation in which it hasn't increased). If you assume the identity value only guarantees that only one record will have that value, and that is the only thing you assume, you'll be safe. Assuming anything else is assuming too much.

|||

Always getting consecutive numbers for a column in any database is very difficult to achieve, as databases by their very nature are accessed in parallel and not in serial. Once you start to think about the problems you could encounter trying to guarantee consecutive numbers then you'll realise why it is impossible to achieve and also have good performance.

Unless there is a really, really, really good reason why you don't want gaps in your sequence then just be content that your identity column is unique. It's actual value is usually irrelevent, so don't worry about it.

reinstalling SQL ODBC Drivers on Windows XP

Apparently one of my users lost their ODBC drivers for SQL Server.
When I try to run the program that uses those drivers obviously I get
all kind of errors.
I tried going into the ODBC administrator and when I try to edit or
delete the DSN I get a message about the drivers being missing and I
need to reinstall them.
I tried running MDAC 2.7 and everything ran, but I still get the error.
MDAC 2.8 will not run on that machine - it gives a message saying that
Windows XP already has all of the files associated with MDAC 2.8.
Any ideas on how to reinstall the drivers in a case like this?
Thanks."Matt Bateman" <mattcb@.gmail.com> wrote in message
news:1155132832.189431.183410@.n13g2000cwa.googlegroups.com...
> Apparently one of my users lost their ODBC drivers for SQL Server.
> When I try to run the program that uses those drivers obviously I get
> all kind of errors.
> I tried going into the ODBC administrator and when I try to edit or
> delete the DSN I get a message about the drivers being missing and I
> need to reinstall them.
> I tried running MDAC 2.7 and everything ran, but I still get the error.
> MDAC 2.8 will not run on that machine - it gives a message saying that
> Windows XP already has all of the files associated with MDAC 2.8.
> Any ideas on how to reinstall the drivers in a case like this?
>
Not really, but you can install the SQL Native Client, which contains a
brand-new, MDAC-independant ODBC driver for SQL Server.
Microsoft SQL Server Native Client
http://msdn.microsoft.com/data/ref/sqlnative/
David

reinstalling SQL ODBC Drivers on Windows XP

Apparently one of my users lost their ODBC drivers for SQL Server.
When I try to run the program that uses those drivers obviously I get
all kind of errors.
I tried going into the ODBC administrator and when I try to edit or
delete the DSN I get a message about the drivers being missing and I
need to reinstall them.
I tried running MDAC 2.7 and everything ran, but I still get the error.
MDAC 2.8 will not run on that machine - it gives a message saying that
Windows XP already has all of the files associated with MDAC 2.8.
Any ideas on how to reinstall the drivers in a case like this?
Thanks."Matt Bateman" <mattcb@.gmail.com> wrote in message
news:1155132832.189431.183410@.n13g2000cwa.googlegroups.com...
> Apparently one of my users lost their ODBC drivers for SQL Server.
> When I try to run the program that uses those drivers obviously I get
> all kind of errors.
> I tried going into the ODBC administrator and when I try to edit or
> delete the DSN I get a message about the drivers being missing and I
> need to reinstall them.
> I tried running MDAC 2.7 and everything ran, but I still get the error.
> MDAC 2.8 will not run on that machine - it gives a message saying that
> Windows XP already has all of the files associated with MDAC 2.8.
> Any ideas on how to reinstall the drivers in a case like this?
>
Not really, but you can install the SQL Native Client, which contains a
brand-new, MDAC-independant ODBC driver for SQL Server.
Microsoft SQL Server Native Client
http://msdn.microsoft.com/data/ref/sqlnative/
Davidsql

Tuesday, March 20, 2012

Re-install Issues

Hi folks

This is doing my head in....

Im trying to re-install an instance of sql server 2000. I used the add remove program untility to remove the instance then I try and install the same instance again and the setup bombs out. Here is the failure text from sqlstp.txt.

################################################## #############################
Starting Service ...

Latin1_General_CI_AS

-m -Q -T4022 -T3659

Connecting to Server ...

driver={sql server};server=REMACWEBDB00A\int1;UID=sa;PWD=;data base=master

[Microsoft][ODBC SQL Server Driver][Named Pipes]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionRead (WrapperRead()).

driver={sql server};server=REMACWEBDB00A\int1;UID=sa;PWD=;data base=master

[Microsoft][ODBC SQL Server Driver][Named Pipes]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionRead (WrapperRead()).

driver={sql server};server=REMACWEBDB00A\int1;UID=sa;PWD=;data base=master

[Microsoft][ODBC SQL Server Driver][Named Pipes]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionRead (WrapperRead()).

SQL Server configuration failed.

################################################## #############################

It seems like the last install never unistalled the instance cleanly. Which to be honest is rubbish.

Anybody any ideas.

ThanksIve followed the steps in the following to remove a named instance :

http://search.support.microsoft.com/kb/290991/

Still no joy :(|||Hi Folks

Issue sorted.

We had on the server client named pipe alias's that were set up when we were trying to solve some win2003/SQL Server 2000 TCP/IP issues outline in the following KB.

http://support.microsoft.com/kb/840219

Anyway I forgot to remove these before the re-install and this what was causing the issues.

Now somebody can explain to me why this is the case. Why does SQL Server install fail when a client alias is present on the box?

Monday, February 20, 2012

Register SQL Server BCP.exe utility

Dear All,

I am facing problem related bulk copy program utility. I have both SQL Server 2000 and SQL server 2005 installed on my PC. The current registered BCP.exe is of version 8.0. When i give command BCP.exe with database of SQL Server 2005 on command prompt it actually check the database in SQL Server 2000. The problem resolved if i the complete directry path is selected i-e C:\Program Files\Microsoft SQL Server\90\Tools\Binn. But i want to enter command on every selected directry on command prompt.

Regards

Haseeb Ahmad

I'm not certain what you're asking here - but if you want the 2005 version of BCP to be the default, change your PATH variable in the operating system to have the binary directories for SQL Server 2005 to be above the ones for SQL Server 2000. You can also create a batch file in the operating system to use instead of calling BCP.EXE that has the full path in it if you don't want to change the PATH variable.|||

Thanks a lot for your help. After changing the path in enviornment variable, the problem has been resolved.

Once again thank you for your cooperation.

Haseeb Ahmad