|
DateTime is a reserved word in MSAccess, and you have chosen it as one of your field names. Try using brackets around it: [DateTime]
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
I wanted to transfer the data of one database to blank database in SQL With Windows Application
divya
-- modified at 6:38 Wednesday 5th July, 2006
|
|
|
|
|
I would recomend using management tools (that comes with your database) to perform a data migration tasks.
Best regards,
-----------
Igor Sukhovhttp://sukhov.net
|
|
|
|
|
divyaswati wrote: Please help me it's urgent
This is a useless subject line. It tells those who can potentially help nothing about your problem. Your subject line should describe your problem in a few words. For example: "Transferring data between databases" would be a much better subject line.
There are no guarantees about the speed we can help with your problem. We are all volunteers and help when we can. So, describing your problem as "urgent" is unlikely to have any impact on the speed with which you receive an answer.
|
|
|
|
|
Hi,
What event should I use to trigger an update of a dataset to the originating DB, in order to take max advantage of dataset scalability without losing data?
I'm building an ASP .NET website driven by an SSE database. Hopefully there will be several thousand users. When a user logs on, the codebehind queries the DB and retrieves up to several dozen records belonging to that user. The user can add, delete, and modify records on several webforms. I'm using a dataset and SqlDataAdapter to get the records at login and caching them in the Session object.
Right now I'm calling SqlDataAdapter.Update(dataset) every time the user submits a webform with a new record. That works, but it doesn't seem very efficient. But I can't figure out how else to do it without potentially losing records. What if the user enters a record, and then closes the browser window? What if he times out or goes to another website before my Update method runs?
How do I take better advantage of datasets and data adapters? Is there a way to detect the end of a Session and set up an event handler to run an update then? Or maybe cache to the Application and run an update on time intervals?
I apologize if this question is elementary. I'm early in the learning process for C# / ASP .NET / ADO.
TIA
-- modified at 0:15 Wednesday 5th July, 2006
|
|
|
|
|
Run the code SessionEnd event as well if its a ASP.NET web page.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
my Access database have set the password,but I don't know how to write the oleDb ConnectionString.somebody help me!
thank you.
KSCsoft
|
|
|
|
|
|
I have found out,thank you very much!!
KSCsoft
|
|
|
|
|
I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order.
What I want to do is have a "next" button on that form populate the textboxes with data from the next row.
1. Can I just execute some onClick code to do this easily and if so where can I locate an example code?
2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation.
TIA.
Glen Harvy
|
|
|
|
|
Hi Glen,
You may want to check this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp
Hope it helps
--Dimple
|
|
|
|
|
Thanks for the reference.
It's close enough for me to learn from
Glen Harvy
|
|
|
|
|
If you are using the Visual Studio IDE, there is a template form for data. The wizard will ask if you want to display one record or multiple records. Selecting one record will generate a form that has the text boxes for editing data values as well as the navigation controls. The code generated should be very similar to the example you've already seen. For a simple application it might be close to what you need without all the cut & paste.
>>>-----> MikeO
|
|
|
|
|
Mike Osbahr wrote: If you are using the Visual Studio IDE
I am.
Thank you for this - I'm learning the IDE as well so you've helped with two areas that I need development on
Glen Harvy
|
|
|
|
|
Hi,
I want to make use of the .NET 2.0 memberships and roles tables in my database.
I'm referring to the following tables (not all is listed):
aspnet_Applications
aspnet_Membership
aspnet_Roles
aspnet_Users
aspnet_UsersInRoles
What is the best possible way of getting these tables in my database? Creating and running the SQL script? And how do I write code to access and modify the contents of these tables?
Is this the best possible way to go about it?
Regards,
ma se
|
|
|
|
|
Take a look at this article. It may be helpful.
http://aspnet.4guysfromrolla.com/articles/121405-1.aspx#postadlink[^]
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Hi,
The creation of a new login is a bit confusing to me in SQL Server 2005. I usually use username sa and it's password. But now I'm trying to add the DotNetNuke database, with a different login name. They say I must go and create a new login, and a new user. What is the difference btween the 2?
This does not just apply to the DNN database, I want to do the same when adding any other new database.
Please can someone help me with my confusion??
Regards,
ma se
|
|
|
|
|
|
If you do not prefer to use the Enterprise Manager, you can run something like this from the Query Analyzer:
DECLARE @cNewUser VARCHAR(20)<br />
DECLARE @cNewPassword VARCHAR(20)<br />
SELECT @cNewUser = 'MyName'<br />
SELECT @cNewPassword = 'MyPassword'<br />
<br />
EXEC sp_addlogin @cNewUser,@cNewPassword, 'DNN'<br />
<br />
EXEC sp_grantdbaccess @cNewUser
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
SQL Server has the concept of a login, which is global to a server, and a user, which is specific to a database.
Logins are what get authenticated - you must tell SQL Server either about a Windows username or group, or you must specify a username and password. You can assign fixed server roles to a login (alternatively you can say you make a login a member of a role). These roles control whether a login can create their own databases and various other sorts of administrative rights. You'll find these in Management Studio under Security, Logins.
Users are the same sort of concept within the database itself. A login must be granted access to, and mapped to a user in, a database to be able to access it (unless they're a member of the sysadmin fixed server role). The name of the user in the database can be different from the user's login - normally the database owner's login is given the name dbo within the database. Permissions in a database are assigned to a user or to a role - again, you can make users members of roles to make the permissions easier to manage. Create users in Management Studio by going to Database, Security, Users.
Normally I simply make users members of the public database role then set permissions for that role. I allow Management Studio to add the login to the database by checking the box next to the database in User Mapping in the login's Properties. If you need different permissions for different subsystems - probably a good idea - then create more logins and users.
I'm afraid I don't know much about using application roles. I can see they're there, and I think they would allow you to keep and use a single login but assign different permissions for different applications accessing the same database. For DNN this is almost certainly overkill. It looks like you need to code explicitly to use different application roles (the documentation mentions using sp_setapprole to change to a different role).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
I've been googling all day, found info but it still doesn't work
I have a binary field of 50 bytes long. I need to load this from the database and
store it into a byte array in my application VC++ (NO .NET). But it seems I just can't convert the SafeArray data into a BYTE[]. I'm really stuck on this. I am getting despreratly, this shouldn't be this hard so what don't i see.
...
_RecordsetPtr rsFoo;
_variant_t vtHolder;
int iMyID;
BYTE* pMyData = new BYTE[50];
try
{
rsFoo.CreateInstance(__uuidof(Recordset));
rsFoo->Open((_bstr_t)strQuery, GetConnectionPtr().GetInterfacePtr(), adOpenDynamic,adLockReadOnly, adCmdText);
if(rsFoo->adoEOF && rsFoo->BOF)
return;
vtHolder = rsFoo->GetCollect("ID");
if(vtHolder.vt != NULL)
{
iMyId = (int)vtHolder;
}
vtHolder = rsFoo->GetCollect("Data");
if(vtHolder.vt != NULL)
{
....
....
}
}
catch...
codito ergo sum
|
|
|
|
|
Hi,
I am trying to set one of my data cloumn to auto-increment but there isn't any option in the column properties to do that. I am using VS 2005 to add column to my database, so can someone point me in the right direction? Thanks! And btw, I looked at some of the help which uses VB codes to set the column datatype and set autoincrement to true and stuff... How do you work those thing? haha.. Sorry no experience in VB.
-=Ken=-
|
|
|
|
|
Add the identity attribute to your column
|
|
|
|
|
when i try to attach database to sqlserver
ths error appear
"Server: Msg 602, Level 21, State 50, Line 1
Could not find row in sysindexes for database ID 8, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes. Connection Broken"
i cann't connect to db what is the soulation?!
ma_refay
|
|
|
|
|
Hi, I am asked to work on ASP.NET2.0 web development project which is already in development stage. This project development is in ASP.NET2.0 and SQL Express.
I have downloaded the project related files from the server.
I saw few files as having ".dtsx" extenstion. and one script file (text file, consisting a script to create tables.)
I have following questions.
1. What is .dtsx file meant for?
2. How can I run the query to create datatables? I mean here, in SQL 2000, I used query analyzer to execute queries. How can I do it in SQLExpress? Can I execute the query from VS.NET2005?
Please let me know. Thanks in advance.
|
|
|
|