|
Hi all,
how to write update Query in MS Access??
in sql, we write like this "update tablename set field = '"+ +"' where field= '"+ +"'";"
but its giving an error whenever i write the same query in access......
so, could any one help me how to write "update Query in ms access plz///
Thanks in Advance.!
|
|
|
|
|
Hi,
your syntax is principally correct. What error are you getting?
Robert
|
|
|
|
|
Hi, its saying "Syntax error in UPDATE statement"
|
|
|
|
|
"update tablename set field = '"+ +"' where field= '"+ +"'";"
If the above is exactly your code. It is a matter of c# syntax
Actually you have redundant "
The correction is
"update tablename set field = '"+ +"' where field= '"+ +"';"
Also, you can truncate the smicolon of the query
"update tablename set field = '"+ +"' where field= '"+ +"'"
I hope this helps
Mohamed Gouda
Egypt
|
|
|
|
|
Hi, thanks for the reply...
i have tried these two cases: its giving error like
" ; expected "
actually this is my query statements::
string strQuery = "update UserInfo set Password = '"+ txtNewPwd.Text +"' where Password = '"+ txtOldPwd.Text +"'";
any other solution plz...
|
|
|
|
|
Make sure you use the correct spacing
However, set a break point at that statement and debug to wathc the string
Mohamed Gouda
Egypt
|
|
|
|
|
well, i did debug using break point.. Actually, it is executing the code step by step but at the end of the debugging a message box displayed "syntax error in UPDATE statement" ..
|
|
|
|
|
string strQuery = "update UserInfo set Password = '"+ txtNewPwd.Text +"' where Password = '"+ txtOldPwd.Text +"'";
In the aove string you need to take space before WHERE
Note that 'where is COMPLETELY different from ' where
This missed space makes the error
Mohamed Gouda
Egypt
|
|
|
|
|
there is space b/w ' & WHERE........
|
|
|
|
|
It might be that Password is a keyword in Access try:
string strQuery = "update UserInfo set \"Password\" = '"+ txtNewPwd.Text +"' where \"Password\" = '"+ txtOldPwd.Text +"'";
Robert
|
|
|
|
|
Hi, thanks for the help!
yes, Password is a keyword in Access. I have changed it to "pwd" & it worked very well....... Thanks!
|
|
|
|
|
Hie.I'm looking for a control in c# that can be a suitable viewer for GISMAP projects. Would you please help me?
sarv
|
|
|
|
|
Hi! What are GISMAP projects?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi, How can i get drive info(free/used space) in vs 2003?
(in vs 2005 there's the DriveInfo class)
thanks.
sh
|
|
|
|
|
Hi!
You can p/invoke GetDiskFreeSpaceEx to get this information.
Because GetDiskFreeSpaceEx returns ULARGE_INTEGER s, your p/invoke declaration should contain out long for these parameters.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hello,
Yesterday I was trying to do the same thing and I found your post. Here is a solution I found:
<br />
System.Management.ManagementObject disk = new System.Management.ManagementObject("win32_logicaldisk.deviceid=\"c:\"");<br />
System.Management.PropertyData freeSpace = disk.Properties["FreeSpace"];<br />
Console.WriteLine("Free space on C: drive is: {0}", freeSpace.Value.ToString());<br />
You'll need to add a reference to System.Management to your project.
In this code snippet, freeSpace.Value will contain the amount of free space in bytes as a decimal number.
BDF
|
|
|
|
|
Can any one give me a brief description about what envoy sink, server context sink and object context sink does in .NET Remoting ?
Thanks in Advance
Phanindra...
|
|
|
|
|
using C#,searching data from the database by using key and print that information
(this database very big.)
|
|
|
|
|
we can't do your work.
What you have done for this so for?
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Is there any way to save the user's credentials to the database and re-use them?
I wanted to run all the threads and web-service calls as background processes using user's credentials.
I have tried to searilizing user's default credentials and it looks like that is not possible.
Is there any other options?
Please adivice,
Shrini Viswanathan
|
|
|
|
|
There is a way to pass the user credentials from a frontend application to a backend webservice. Even with the webservice using threads.
You only need to make sure that the webservice and the front-end work with the same credential store (Active directory) and that they use Security Impersonation. The front-end will impersonate the user that logs on to the application and use those credentials to access the webservice. If you enable impersonation on the service as well, you will have the same credentials there that can access resources.
You might want to lookup the documentation on the subject as I don't remember exactly which setting it was in web.config to enable the Security impersonation. Also you need to make sure that the web application(s) run as local system, otherwise impersonation doesn't work on windows 2003.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
hi all
I have been searching around but i havent found anything that JUST does what i need.
does anyone know a good link to a site that would show me how to connect to a sql DB and let me populate a dataset and then fill a datagridview
the database is currently read only so i don't need to worry about writing back to the db.
thanks in advance
Crash
|
|
|
|
|
Have you tried here[^]. There is a handy search function you can use.
only two letters away from being an asset
|
|
|
|
|
i start my timer than when timer is elapsed i want to change my sliderbars value in
private void timer1_elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
slider1.value=100; //i get error message in this line about threading and debug s broken.how can i solve it?
}
|
|
|
|
|
Hi,
you must be more specific:
- what kind of timer, there are at least three different Timer classes in CLR
- what Exception
My best guess is you are NOT using a Forms.Timer hence your timer is accessing
a Control from within a thread that did not create said Control, hence resulting
in an InvalidOperationException. If this suits your case, read up on
Control.InvokeRequired and Control.Invoke()
|
|
|
|