|
third method:-
2) Initialise 1st data adapter
3) Initialise 2nd data adapter
4) Initialise 3rd data adapter
1) Open sql connection
2) fill for the data table 1.
3) fill for the data table 2.
4) fill for the data table 3.
6) close connection.
5) Process my work
As to your second method... you do know that the DataAdapter will handle the open/close for you don't you?
Better yet, don't use DataAdapters, but that's another subject.
P.S. And why use separate ones rather than only one?
|
|
|
|
|
hi
my server ip address is changed,should i configure the new ip address with the sqlserver 2000 which i m using in that system.
if so, then wt are the steps to configure ip address to sqlserver 2000
Thanks in advance
Vijay Kumar D
|
|
|
|
|
Hmm 2000 is a long time ago but I'd try this, attempt to connect using your existing IP address, when that does not work think about your question. If you are using a named server you may not need to change the connection information.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to verify user credentials from login form and check it in sql server Database through stored procedure.
And Confirmation sen back to front end.based on that only i'll allow the user.
Thanks & regards
kiran
|
|
|
|
|
The google force is weak in you.
Have a look here.[^]
"When did ignorance become a point of view" - Dilbert
|
|
|
|
|
Hi,
I am using VS2008, and Sqlexpress2005; before uninstall VS everything works fine. I reinstall VS 2008 and install SQLEXpress 2005; then I tried to add my databse which got this error;however, I went through many articles on the internet but still the same problem. do you have any idea?
its the error
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"<br />
|
|
|
|
|
|
Thanks for the help!
Im a network guy (cisco)/Server admin and I would really like to become proficient with SQL.
I have a very VERY basic grasp of it, so if you could share some possible resources, and maybe some study material links that would be great.
If there is anything with practice labs that would be great. I all ready have a server setup with 2008 ready to be sacrificed.
Thanks for any incite!
Andy
|
|
|
|
|
This site has a quick reference guide to SQL. It has definitions, examples and some samples to try out: http://www.w3schools.com/sql/default.asp
Picking up a book like "SQL: The Complete Reference" could help a lot too. It's packed with information, but you can kind of pick and choose if there are certain areas that you are focusing on. I know they have multiple editions out for it, but I haven't checked out the most recent edition.
I agree that rolling up your sleeves and digging into tutorials and labs is the way to go though. Good luck!
|
|
|
|
|
Buy a copy of Sql Server 2008 T-SQL Fundamentals by Itzik Ben-Gan published by Microsoft; It will give you a thorough grounding in T-SQL. I can't recommend this book highly enough.
|
|
|
|
|
These are all wonderful, thank you so much for the valuable incite!
|
|
|
|
|
Hi!
I'm using SQLite for my game. When a particular button is clicked,I've to get the selection of a list control and delete it from the list control and from the database. for this I'm using the following code and query.
if(m_pSelectProfileImage->getRelativePosition().isPointInside(m_MousePos))
{
stringw strtoDelete = profileList->getListItem(profileList->getSelected());
strtoDelete.make_lower();
strtoDelete.trim();
if(!strtoDelete.equals_ignore_case(L"default"))
{
irr::core::stringc testStr = "DELETE FROM profile WHERE name = '";
testStr += strtoDelete;
testStr += "'";
pManager->SQLdb.Query(testStr);
profileList->removeItem(item);
}
}
I execute the above line and open the database file using SQLite Database Browser to check whether the particular record has been deleted. It's not deleted. When I put a break point to verify the query, my list selection is there in the query(testStr). What might be the problem? How to delete a record?
|
|
|
|
|
Since your SQL query seems to be OK it could be one of two things. It could be that you conversion from strinw to stringc is doing something with the query (eg you are getting strange characters in your query because of conversion issues).
A second potential cause could be that the pManager->SQLdb.Query function doesn't actually execute the query but just prepares the internal object for execution (but I can't say this for sure as I have no idea what the buildup of that class is).
There is also a note in SQLite that case insensative unicode matching doesn't work see point 18.
I hope this helps you a bit along.
|
|
|
|
|
Good Day All
i am producing an XML from a Query and on result pane i clicked the XML results and it showed my XML nicely, now i wanted to save it in my local machine as an XML file, i clicked the save's and chooses the location and when i click on save it gave me this error
The Operation could not Completed. Not enough storage is available to complete this operation
My XML 50 Megs
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Please tell me you checked the disk space!
Is there a limitation on the size of xml files, does the parser support 50mb. I know we had to chop up a bunch of xml files a few years ago due to some obscure size limitations, I'm not sure if it was the xml or the application producing it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am producing an XML from SQL Management Studio and save it to a file , the part that is supposed to save to a file its where i get a problem. my HD free space is 350GIG
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Try saving on a smaller drive. Some applications check to see if there's enough drive-space available before saving and they sometimes fail on large numbers, claiming that the disk is full when it's not.
I are Troll
|
|
|
|
|
Vuyiswa Maseko wrote: my HD free space is 350GIG
I had to ask - have you tried saving a smaller file. I suspect it is a permissions issue rather than an IO problem. The SQL account holder needs to have permissions on the hard drive.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Good Day David
This is exactly my problem. So the workaround this is to split the XML.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
As an advanced option in my DB GUI I have included the ability to run SQL queries on the DB (an Access MDB).
Before running DELETE or UPDATE queries, I'd like to be able to convert them to SELECT queries so that I can issues a message like "This will DELETE/UPDATE 18 records, are you sure?"
Does anyone know of any code to do this? I can't believe I'm the only person to want to do it, but Google is failing me.
(I know I could probably do this by automating Access, which has 'change query type' functions, but the whole reason for my GUI is that my users might not have Access)
Cheers
modified on Wednesday, September 29, 2010 8:55 PM
|
|
|
|
|
What about wraping the query execution in a transaction, where you would get the number of rows affected, then prompt the user with "Are you sure ?". If the user answers, Yes, then commit the transaction else rollback the transaction.
This assumes that you can do transactions in MS-Access .... I'm not sure.
Good Luck.
|
|
|
|
|
David - this approach works fine, thanks a lot!
|
|
|
|
|
I'm not sure how you handle queries in Access spit but I would replace DELETE with Select Count(*) and execute the select query, use the results to hassle the user and then delete the data.
BTW I cannot imagine giving a user the ability to write and execute sql code against the database, advanced or not. The mere fact that you want to get confirmation from your user supports my horror.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I know what you mean about user access to SQL - but the support benefits of having this are considerable (not least because it means I don't have to write GUI code for every table blah blah).
Still, it'll probably end up hidden behind a secret key combination know only to the enlightened few. Or something like that!
|
|
|
|