|
Hi,
Please suggest if there is any difference between using keywords JOIN and INNER JOIN? Is there any perfomance advantange in using one of them ?
Ashu Sharma
Web Analyst
|
|
|
|
|
JOIN == INNER JOIN. INNER JOIN is implied when using JOIN. No performance difference.
|
|
|
|
|
|
|
I thought similar but was just wondering about the performance. Thanks anyways!
Ashu
|
|
|
|
|
|
Hi...,
In VB or C#.net how i export sql database data in access database file as in Sql default feature.
Also i if someone know the script of export sql data in access file.
|
|
|
|
|
Could you explain your questions in a different way? Do you want to transfer data between an SQL database(SQL Server or MySQL) and an Access database?
|
|
|
|
|
So i want to transfer data between an SQL database(SQL Server 2000) to an Access database.
If you knew any thing about this problem please tell me.
|
|
|
|
|
Well, you can create DTS package in SQL Server to transfer data, and then run the package from your application. Do you get it?
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
what i want to do is a very basic database. the program will have some check boxes and depending on whats checked a list box will display certain items. i thought a database would work good for this. i tryed useing a txt file and stringreader and a array to sort the data but was having problems if someone knows a good place to learn how to do thise type of things please tell me
also i tryed a database but it needs you to register the database file with windows.. I dont what to do this becouse i will be usen this program on differnt computers. so is there a simple db that can be moble
|
|
|
|
|
Try to check this sample training course[^]. It teach you about using visual basic and access database.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
What information are you trying to store/retrieve? From your description, it sounds like you may be able to handle what you want in code.
|
|
|
|
|
its a tree id program.. they will have options thu check boxes ( usless theres a better way) like needles or board leaf. shape, location ect.. i was thinking database becouse there are a ton of differnt types of trees. and to code them all in would be a pain later on if i wanted to edit them.
Edit: I had a simple version of what i want to do in c++. i was trying to remake it and add to it useing c# im new to c# and databases thu so its a learning experiance.
|
|
|
|
|
So you will be keeping the trees in the database and based on which characteristics are checked, the matching tree will show in the listbox?
And you are using a listbox for the trees because you also want the user to be able to choose a tree and see the characteristics in the checkboxes?
You will need to establish the database first. You can use Access to set up your database. Once it's setup you just need to copy the database file to wherever you want it to go, you won't need Access after it's setup, except to make changes to the database. Your program will be able to run on computers without Access. If you can't use Access, you can try to set it up using another database program and copy the database file to where you want to work with it. I don't see why that wouldn't work.
|
|
|
|
|
Right it will only show what trees match what is checked and display those. And if you click a tree it would show what it has. yes i have access. im in college right now ( not a very good one) thats why im here asking questions.. but anyways in school when we did databases we had to go into the ODBC and setup the path of the database. i asked my teacher about c# she said she heard of c# but knew nothening more ( im changing schools ) so thats where im at im not sure what to use to have my program to read from the database without all the extra setup each time I put this program on a differnt computer. I wont lie im really new to database stuff and im willing to buy books or what ever if you know of any good ones.
|
|
|
|
|
I am new to writing programs that access database files myself. I have found the books from Murach publishing to be very useful, although I am learning VB.NET. They do have a C# book that covers databases ADO.NET. Their examples usually use SQL, just replace sql with oledb and it should work.
I have also just begun to learn how to deploy an applications, so I don't know all the ins and outs, but I have my database in its own folder on the C drive and I install this folder on the C drive on the computers I want to run the program, so the reference in the connection remains the same. There is probably a way of doing this automatically through the setup program, but I haven't learned that yet.
|
|
|
|
|
I am thinking of implementing two SQL statements with either one that can be used by a user. For one, I want the run the query where the very first character of the data of the "Name" field is equivalent to the alphabet selected. E.G: I pick 'B' and it searches for data in "Name" field where name starts with B.
The other one is where it searches for a name that has one of the words entered by the user. Say that if I enter Jiminez and the database returns 2 records where it has Jiminez as either the middle or the surname.
The problem is that i've tried in doing in access query with some test data by entering the LIKE predicate but no result. Please help a.s.a.p
|
|
|
|
|
query 1 :" SELECT * FROM... WHERE CUSTNAME LIKE 'A%'" returns everything strating with A
query 2 :" SELECT * FROM... WHERE CUSTNAME LIKE '%John%'" returns everything that contain john
to get both querys in one dataSet:
SELECT * FROM... WHERE CUSTNAME LIKE 'A%'
UNION
SELECT * FROM... WHERE CUSTNAME LIKE '%John%'
to do that you must ensure that the two queries must have the SAME columns layout AND SAME columns number
GanDad
|
|
|
|
|
I have a field set with a type of datetime size 8. When I run an SQL statement like this
SELECT TOP 1 MDC1_DATA_TEXT, MDC1_REV_DATE<br />
FROM MDC1<br />
WHERE (MDC1_I_O = 'O') thru the qurey analyzer I get this:
2005-02-25 16:12:07.373
When I run the statement thru enterprise manager by right clicking on the table and choosing open table return all rows then clicking on the SQL button in the toolbar and running my statement, I get this:
2/25/2005 4:12:07 PM
This is the same thing that comes across when I run my SQL statement in my program. The problem is that this "2/25/2005 4:12:07 PM" does not contain milliseconds which is part of the primary key and needed to delete the record after reading it in. Does anyon know how to have SQL return back the other date time stamp?
Here is my code that I'm using in my program:
<br />
try<br />
{<br />
pCommand.CreateInstance(__uuidof(Command));<br />
pCommand->ActiveConnection = m_pConnection;<br />
pCommand->CommandText = _bstr_t("SELECT TOP 1 * FROM MDC1 WHERE (MDC1_I_O = 'O')");<br />
pRecordset.CreateInstance(__uuidof(Recordset));<br />
pRecordset->CursorLocation = adUseClient;<br />
pRecordset->Open((IDispatch*) pCommand, <br />
vtMissing,<br />
adOpenStatic,<br />
adLockBatchOptimistic,<br />
adCmdUnknown);<br />
_variant_t MDC1_DATA_TEXT;<br />
_variant_t MDC1_REV_DATE;<br />
<br />
while (!pRecordset->adoEOF)<br />
{<br />
CString mySQLData = (char*)(_bstr_t)pRecordset->Fields->GetItem("MDC1_DATA_TEXT")->Value;<br />
CString revDate = (char*) (_bstr_t)pRecordset->Fields->GetItem("MDC1_REV_DATE")->Value;<br />
Should I set my pointer for the rev_date to something else?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
I don't think your problem is SQL, I think it is with how .NET handles DateTime. You might try reading up on DataTime and see how it handles milliseconds. I did a quick search on www.support.microsoft.com and there seem to be a problem with what you want to do.
|
|
|
|
|
You are casting it to a string not converting it with a format specifier, so it is going to use default formatting which rounds to seconds. Retain the value as a variant, so that the presison is not lost, use it in a parameterised query when you need to delete.
Beware of string conversions from date time, they are locale dependant, and unless you specify the formating the default precison of the conversion is likely seconds.
SQL servers Date data type is accurate to 3 ms, but will round up: the next values after .373 will be .377 then .380.
Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed.
Carl Sandburg
|
|
|
|
|
Hi to all, sorry me for my Inglish.
I have a Problem:
I want to select rows from my Oracle table which named "Table1" and I want to do it with oracleDataAdapter.
It's OK when I use OleDbDataAdapter:
............
command.CommandText="select name from Table1 where num = ?";
Ole.OleDbDataAdapter ada=new Ole.OleDbDataAdapter();
ada.SelectCommand=com;
command.Parameters.Add("@num",Ole.OleDbType.Numeric,3);
command.Parameters[0].Value=1;
............
Can you give me this code with using the oracleDataAdapter and with parameters of oracleConnection.
I had not find the using of oracle parameters in MSDN.At last can you give me Internet resource with the using of oracle in C#.
Thanks.
Gerder
|
|
|
|
|
Have you tried using the SQLDataAdapter and just substitute "SQL" for everywhere you have "OleDb"?
|
|
|
|
|
Hi there,
I am having difficuly inserting a record into the database. I came to realize that it may be because of my column name that contains brackets. It inserts just fine with other fields that are the same data type but it stops at the bracketed field name. How can I get around this? I can change the column name to exclude any spaces because it's a pre-defined format. I tried bracketing the field name within my code so it's the same as in the design view but it still doesn't work. Can someone help me please. Here's my code below:
----------------------------------------------------------------------------------------------------
COleSafeArray vaFieldList;
vaFieldList.CreateOneDim(VT_VARIANT, 4);
COleSafeArray vaValueArray;
vaValueArray.CreateOneDim(VT_VARIANT, 4);
long lArrayIndex[1];
lArrayIndex[0] = 0;
vaFieldList.PutElement(lArrayIndex, &(_variant_t("NAME")));
lArrayIndex[0] = 1;
vaFieldList.PutElement(lArrayIndex, &(_variant_t("ADDRESS")));
lArrayIndex[0] = 2;
vaFieldList.PutElement(lArrayIndex, &(_variant_t("EMAIL")));
lArrayIndex[0] = 3;
vaFieldList.PutElement(lArrayIndex, &(_variant_t("[NUM CARS]"))); //will not insert this field
lArrayIndex[0] = 0;
vaValueArray.PutElement(lArrayIndex, &(_variant_t(m_name)));
lArrayIndex[0] = 1;
vaValueArray.PutElement(lArrayIndex, &(_variant_t(m_address)));
lArrayIndex[0] = 2;
vaValueArray.PutElement(lArrayIndex, &(_variant_t(m_email)));
lArrayIndex[0] = 3;
vaValueArray.PutElement(lArrayIndex, &(_variant_t(m_num_cars)));
pRecordset->AddNew(vaFieldList, vaValueArray);
pRecordset->Close();
Thanks!
|
|
|
|