|
|
Hi ,
Please incorporate below code to use MS Access as ur backend.
connection =
new OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};"+
"DBQ=c:\\program files\\common files\\"+
"borland shared\\data\\dbdemos.mdb");
connection.Open();
dataadapter = new OdbcDataAdapter("select * from customer", connection);
dataset = new DataSet();
dataadapter.Fill(dataset, "table1");
dataGrid1.DataSource = dataset;
dataGrid1.DataMember = "table1";
Regards,
Suyash
|
|
|
|
|
will hi i'm new to programming world but i like competition i'm building a database & i'm connecting it with vb.net the database is fine but every time i had a problem with the connection not just these i want to make a search in the database to delete certain record or row i will send a copy of the DB & my project i really need some answer & if there is any one how can chat with me on the messenger to help me & give him the copy of the DB & the project this is my Email " h_27717@hotmail.com"
thanks for any help
& pest regards
nowdy
|
|
|
|
|
nowdy wrote: this is my Email " h_27717@hotmail.com"
Great way to open yourself to spammers.
nowdy wrote: pest regards
Should be best regards.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Paul Conrad wrote: Should be best regards.
Are you certain ? :P
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or if he's trolling, just leave it as "pest regards"
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Oh thank you & forgive me for my mistakes in the language because the is not my mother tongue i speaks arabic & i'm sure if u will going to speaks my language i'm not going to
Mocke
you Sir
|
|
|
|
|
nowdy wrote: Mocke
you Sir
Huh?
nowdy wrote: forgive me for my mistakes in the language because the is not my mother tongue
No worries ( no problem ), take your time learning it
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
hi yas I'm i don't have any one can help me now i just have the expert people here to help me because they are the only one who will understands my problem
|
|
|
|
|
Really, your best bet is to work through some more basic stuff, and then use google. You're asking 'how do I do xxx' questions, which are best answered by books and articles. 'What's wrong with these few lines of code' questions are best suited to forums.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank u very much for your advice i'll use it & i would not going to asks for help if my time wasn't at risk
thanks for your time
|
|
|
|
|
nowdy wrote: i just have the expert people here to help me because they are the only one who will understands my problem
Don't count on it. I couldn't understand a bloody thing you said in your original post. i have no what you're trying to do or what the problem is.
|
|
|
|
|
Hi
I hav a problem with my stored procedure, its taking far too long.
I have used simple JOIN statements, but unfortunately I have 7 tables to JOIN and therefore 6 JOIN statements in this one procedure.
There is also a simple SUM calculation happening within this query as well.
But this procedure is takin far too long to get the results. Was going on 18 minutes and counting when i cancelled it.
Can anyone help me out?
|
|
|
|
|
Show the code for the stored procedure, along with the database table structure/schema and someone might be able to shed some light for you.
rcwoods wrote: Was going on 18 minutes and counting when i cancelled it.
How many records do you expect it to return?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Thanks for the reply, I think i figured out what was wrong.
It was expected to return alot of records.in the high thousands.
Thanks again for reply
|
|
|
|
|
Out of curiosity, how many thousands of records? Sounds like 18+ minutes is still way too long.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
i think it was more about my query..i can see now that i need a subquery.
|
|
|
|
|
Glad you got it to work
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Could somebody provide an explanation for how to programmatically add a new column to an existing Microsoft Access table, or point me to a resource article?
|
|
|
|
|
You probably want to use the ALTER TABLE .... in a query to do that.
The following, SQL Tutorial[^] might be helpful. Though I've done databases for over 15 years, even I find it helpful for remembering some SQL that I use in rare cases.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
Hi
How can i format numeric data in SQL Server 2005
such as decimal places, use 1000 separator(,)
example: 1234567.23 -> 1,234,567.23
Thanks
|
|
|
|
|
You don't do that in the database, you do that in the interface.
|
|
|
|
|
hi
my table is like
ProductID CagtegoryID
1 1,2,
2 1,
3 4,
4 2,3,
and for SELECT Query if i give the categoryid=1,2 then i want the output like
ProductID CagtegoryID
1 1,2,
2 1,
4 2,3,
Jintal Patel
|
|
|
|
|
I think you need to learn about normalisation. You are storing multiple things in the categoryID column.
By the looks of it you have a many to many join. To create a many-to-many join you need an intermediate table.
So you have a Product table and a Category table and in between you have a ProductCategory table. The intermediate ProductCategory table contains just the primary keys of the source tables.
So,
Product table:
ProductID
1
2
3
4
Category table:
CategoryID
1
2
3
4
ProductCategory table:
ProductID CategoryID
1 1
1 2
2 1
3 4
4 2
4 3
To get the results you want:
SELECT ProductID, CategoryID FROM ProductCategory WHERE CategoryID IN (1,2)
If you need other columns from the product and category tables you'll need a join too. e.g.
SELECT p.ProductID, c.CategoryID, p.ProductName, c.CategoryName
FROM Product AS p
INNER JOIN ProductCategory AS pc ON p.ProductID = pc.ProductID
INNER JOIN Category AS c on c.CategoryID = pc.CategoryID
WHERE c.CategoryID IN (1,2)
|
|
|
|
|
thanks for Solution
i getting my value by Like this
SELECT * FROM [DB_Ecommerce].[dbo].[tb_Ecomm_Product] Where Charindex('8',CategoryId)<>0 or Charindex('2',CategoryId)<>0 ;
Jintal Patel
|
|
|
|