Showing posts with label key. Show all posts
Showing posts with label key. Show all posts

Wednesday, March 28, 2012

Saving ODBC password

I have an app that uses ODBC for connection. Everytime the users log in it prompts the user to enter a password.

Is there any way (reg key entery ?) for the password to be saved so the user is not prompted?

Thanks

MPM

No, I'm sorry you can't do that. This is a security issue, since someone may gain access to your registry information, and thereby uncover your password. Even if you modified your registry information to store the password ODBC would not read that information.

I can't think of a work-around, unless you had a VB script or something that automatically logged on to a database? Perhaps you could use trusted connection instead of UserID/Password connection?

Hope this helps.

~Warren

|||There is no way to save the ODBC password in the registery. But you can do somethings to avoid this.

1. If you have a logon screen in your app. You can use the same password to get access to your app and to get access to your DB. If you do that you can just store the user/pass used to get access to the app and use it for the ODBC.
2. You can use trusted connection if you are using a Domain Controller, this is the easiest way.
3. You can code a box that opens instead of the default ODBC password request box and store the password in a MDB file.

Here's my suggestions.

Regards

JBsql

Saving ODBC password

I have an app that uses ODBC for connection. Everytime the users log in it prompts the user to enter a password.

Is there any way (reg key entery ?) for the password to be saved so the user is not prompted?

Thanks

MPM

No, I'm sorry you can't do that. This is a security issue, since someone may gain access to your registry information, and thereby uncover your password. Even if you modified your registry information to store the password ODBC would not read that information.

I can't think of a work-around, unless you had a VB script or something that automatically logged on to a database? Perhaps you could use trusted connection instead of UserID/Password connection?

Hope this helps.

~Warren

|||There is no way to save the ODBC password in the registery. But you can do somethings to avoid this.

1. If you have a logon screen in your app. You can use the same password to get access to your app and to get access to your DB. If you do that you can just store the user/pass used to get access to the app and use it for the ODBC.
2. You can use trusted connection if you are using a Domain Controller, this is the easiest way.
3. You can code a box that opens instead of the default ODBC password request box and store the password in a MDB file.

Here's my suggestions.

Regards

JB

Friday, March 23, 2012

Saving Data into SQLServer

Hi,

Here is a structure of my table

create table events
(
event_id integer primary key identity(1,1),
event_name varchar(200),
event_date datetime,
)

Note: The event_id is a automacally and we don't need to insert record in this field.

for example

i have inserted 10 records in a table

then i deleted all records manually from sql server

but when again I save the record the event_id field shows started from 11 even the table was empty,

although it should be start from 1?

11 was saved on the table for the next Id to be used.

|||

So how I manage this records becuase I want to start from 1 if I have deleted from database.

|||

That is proper. The only way to start back at 1 would be to reindex your DB. The Identity prperty will always give a "unique" number that hasnt been assigned before.

Hope this helps

Tim

|||

Well, Tim Could you please explain me that how I can reindex automatically this table I am using asp.net

|||

Actually now that i think about it, an even easy solution would be to just drop and recreate the table after you have deleted the records:

Just right click on the table on SQL server Object explorer and go to Script Table as --> Create to --> New Query Editor Window. This will give you the script to create the table exactly as you haven ow if you dont already ahve it then simply in a script do the following:


DROP TABLE 'TableName'

Paste CREATE TABLE script here

GO

May I ask why you need th eindex to start over after you delete records? Are you using the ID's somewhere else?

Tim

|||

Actually I am doing a Project thats why I am asking anyway I solved my Problem Thanks a lot

Cheers!