Showing posts with label convert. Show all posts
Showing posts with label convert. Show all posts

Friday, March 23, 2012

Importing old data into asp_tables...?

I have created an application that uses the login, create, etc login components in .net. How hard is it to convert all my old users, passwords, usertypes into the new tables. It almost looks like I have to do them by hand and created a new guid(userid), along with the same guid in the aspnet_usersinroles and aspnet_Membership. Is there a script to do this programatically?

Hi,

You can use t-sql cursor to go record by record thru your old table and inserting to asp.net tables. The difficult part is passwords. I think it would be too difficult to decode and encode password in t-sql.

So, probably first import data and then use asp.net to re-encode passwords. As far as I know there are no utilities to do it automatically.

Sunday, February 19, 2012

Importing Access table

hi guys,
i have a problem here. i want to import a table from microsoft access, but i encountered an error. it says something like cannot convert into sqlserver format. I notice that the column in the access table that causes the error is actually an auto-number column with long integer. What i have to do to be able to import the table in?
thanxAssuming you want it to continue to be an autonumber/identity it has to be a a numeric field of some sort (so int, big int, numeric, not sure what else is allowed to be an identity).

You are most likely having a problem because the column is set to int and the number in your access db is more then a standard sql int. try changing it to big int and see what happens.|||u mean big int in access or sqlserver? i checked just now, access in the size field only has long integer or replication ID. What if i change it to replication ID? i'm new to sqlserver, i just know access.please help.
thanx|||Are you upsizing or importing ?|||importing...from an access table. coz i am migrating to sqlserver from access, my application can run using access.|||big int in sql server.|||ok then i'll try it later, thanx guys...|||Long integer in access is the same as int in sql. Both are 4 bytes. What are the other field definitions in that table ? Also, what is the definition of the sql server table ?|||you sure on that?? I understood that that used to be the case but it changed with sql server 2k.|||i'm not sure about the bytes of the data type, but in my table there are text data type in my access table. and after convert they will change to nvarchar in sqlserver. i know this because i successfully converted a different table.|||yeah i did not declare anything for the sqlserver table because i use the import wizard and just find the path of my database. then it run into this autonumber problem.|||okie, just had a look through the doco and an int (in sql) should be fine for a long (in access).|||Can you post the mdb with the same schema and a few records ?|||sorry, i can only post it on fri as it's christmas, so i'll let u guys know later ok!
thanx guys and have a merry christmas!