|
Then try to read the all table name and pass as argument to the query
e.g
string s= select * from + tablename ;
dbcommand.Text=s;
create a object of database and read the table !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
hey,
check ur latest post in this forum and let me know when done !!!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
any reason why you use ODBC and not OleDb?
V.
No hurries, no worries
|
|
|
|
|
Yes
What if i move the file?
the string of the path is not valid any more.
ODBC is a driver it knows "where" the file is.
kobkob
|
|
|
|
|
Why would you 'move' the file?
And besides, I could be wrong on this one, I never work with ODBC if I can avoid it, don't you need to add the database in the ODBC datasources of windows? In fact, your DSN is nothing more then a name corresponding to a path.
kobibi wrote: ODBC is a driver
And what is OleDb you think? A fluffy bunny rabbit ?? (lol, it was joke ), seriously OleDb is much faster then ODBC.
Note: There is nothing wrong with ODBC..., it's just old
|
|
|
|
|
O.K
So if i'll use the OleDb how can i get all of my tables from ".mdb"?
and the important thing is maybe some IDIOT will move the file
how can i handle that?
kobkob
|
|
|
|
|
Same principle as ODBC, you need a connection string:
This[^] might be helpful?
You can check if the file exists, I think with the File or FileObject classes, which has a property or method FileExists...
good luck.
|
|
|
|
|
and another Q
if i'm using the bindingSource
will it the do the work for me???
kobkob
|
|
|
|
|
kobibi wrote: bindingSource
The what now?
|
|
|
|
|
Never mind
Last Q cause "i'm going slitly mad" (not angry but nutty )
i realy did not get how to read 50 tables from a datbase
i've got this :
OdbcConnection dbCon = new OdbcConnection("DSN=myData");
dbCon.Open();
now what?
it goes somthing like this ?
OdbcCommand dbcom = new OdbcCommand("",dbCon);
but OdbcCommand("",dbCon);
OdbcDataReader dbRdr = dbcom.ExecuteReader();
while (dbRdr.Read())
{
}
OdbcCommand("",dbCon); needs SQL Query
and i do not want to write any SQL Q only to build a DataSet
and to fiil it with all of the tables from the file
maybe if can give me code in OleBd would be fine too
sorry for confusing u, i'm still learning
kobkob
|
|
|
|
|
i have post ur sollution , check it
Happy Programming
-----
Abhijit
|
|
|
|
|
I'm not sure if it is possible to do selects without select statements.
like the OdbcConnection there is a class OleDbConnection, look it up in MSDN.
First you open up the connection and pass a SQL to the OleDbDataAdapter that can fill a DataSet or DataReader .
There are plenty of examples on the net.
Seeing your questions I actually advice you to buy a good book though. I also tried to learn ADO.Net via the internet, but it wasn't until I read a book I got a more or less clear view of it.
good luck.
|
|
|
|
|
I dont have any clue about sending attacments, i refer MSDN & its having help for asp via internet, but i am not using internet as medium.
Does it depends on medium to send attachments?
I want to send files as attachments over wireless & in LAN thru s/w.
files can be of any extension.
So plz tell me what should i do or follow.
thanks & regards,
humdum.
|
|
|
|
|
Hi, I have to copy data from acces database to sql2000 database.
i declare access connection,adpator,dataset,table in loedb. now what evere data comes into dataset of particular table , i want that table value should update into sql2000 db. i made all db in sql. if any one has solution pls reply.
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
You have to specify update command in DataAdapter . Then call DataAdapter.Update(DataSet)
|
|
|
|
|
i writr following code
Hi there,
I have two databases, MS Access and SQL Server 2000
Using a procedure in Visual Studio i would like to copy all the records from one table in MS Access into an existing table in SQL Server (the tables have the same name and the same layout)
I tried to prepare one Dataset to copy from Access into SQL Server but when i run the command 'DaSQL.Update(DsSQL, "Tabella") nothing happens (not even an exeption has been raised), looking during debug, the DataSet seems filled though...
Please could anyone explain what's wrong and / or is there a more quicker way to copy data from a table to another?
Note i woul have as a final goal to get data from an AS400 database by ODBC, manage it, and put it on SQL Server for a 'data mining' scope (eliminating the use of MS Access, not suited for FE-BE).
the procedure goes like this;
' Create a connection to the MS Access Database
Dim connectionToAccess As New OleDbConnection(DBConnectionAccString)
strsql = "SELECT * FROM [TABELLA]"
connectionToAccess.Open()
Dim DaAccess As New OleDbDataAdapter(strsql, connectionToAccess)
Dim DsAccess As New DataSet("ACCESS")
DaAccess.FillSchema(DsAccess, SchemaType.Source, "Tabella")
DaAccess.Fill(DsAccess, "Tabella")
' Create a connection to the SQL Database
Dim connectionToSQL As New SqlConnection(DBConnectionSQLString)
connectionToSQL.Open()
Dim DaSQL As New SqlDataAdapter(strsql, connectionToSQL)
Dim DsSQL As New DataSet("SQL")
DaSQL.FillSchema(DsSQL, SchemaType.Source, "Tabella")
DaSQL.Fill(DsAccess, "Tabella")
DaSQL.Update(DsSQL, "Tabella")
Note I tried also the following, withou a result;
DsSQL = DsAccess.Copy
DaSQL.Update(DsSQL, "Tabella")
Please is there someone who could respond !!???
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hi,
there's a method called SqlDataAdapter.Update(DataSet myDS). This method should solve your problem.
Tobias
|
|
|
|
|
i writr following code
Hi there,
I have two databases, MS Access and SQL Server 2000
Using a procedure in Visual Studio i would like to copy all the records from one table in MS Access into an existing table in SQL Server (the tables have the same name and the same layout)
I tried to prepare one Dataset to copy from Access into SQL Server but when i run the command 'DaSQL.Update(DsSQL, "Tabella") nothing happens (not even an exeption has been raised), looking during debug, the DataSet seems filled though...
Please could anyone explain what's wrong and / or is there a more quicker way to copy data from a table to another?
Note i woul have as a final goal to get data from an AS400 database by ODBC, manage it, and put it on SQL Server for a 'data mining' scope (eliminating the use of MS Access, not suited for FE-BE).
the procedure goes like this;
' Create a connection to the MS Access Database
Dim connectionToAccess As New OleDbConnection(DBConnectionAccString)
strsql = "SELECT * FROM [TABELLA]"
connectionToAccess.Open()
Dim DaAccess As New OleDbDataAdapter(strsql, connectionToAccess)
Dim DsAccess As New DataSet("ACCESS")
DaAccess.FillSchema(DsAccess, SchemaType.Source, "Tabella")
DaAccess.Fill(DsAccess, "Tabella")
' Create a connection to the SQL Database
Dim connectionToSQL As New SqlConnection(DBConnectionSQLString)
connectionToSQL.Open()
Dim DaSQL As New SqlDataAdapter(strsql, connectionToSQL)
Dim DsSQL As New DataSet("SQL")
DaSQL.FillSchema(DsSQL, SchemaType.Source, "Tabella")
DaSQL.Fill(DsAccess, "Tabella")
DaSQL.Update(DsSQL, "Tabella")
Note I tried also the following, withou a result;
DsSQL = DsAccess.Copy
DaSQL.Update(DsSQL, "Tabella")
Please is there someone who could respond !!???
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
hi I believe u r using C# for all this. now in .NET 2005, u have different namespaces for different types of the DBs for eg. OleDB for Access and SqlClient for SQL server 2000/05, but the good news is that one thing remains common in the both and that is Dataset.
So now from ur question, I infer that u want to transfer ur data from Access to SQL server, if thats right, then the one way is to , first populate the dataset1 with data from Access for different tables, follow the same approach. Now u can put this data in a datagrid and then finally use properties and constructors u insert all the grid rows one by one using a for loop into ur SQL server DB.
Other approach is to use SQL servr Integration Services (SSIS) directly to transfer data from any data source to any destination.
|
|
|
|
|
Hi All,
I am writing a project in C# using a web browser control. Objective of this project is to automate the browser. I have an element that I want to be clicked automatically. I am using mshtml.IHTMLDocument3 interface to access DOM document and then find the element by ID. Once I do find the element by ID, I cast it to mshtml.IHTMLElement; but when I do that, I get null reference to mshtml.IHTMLElement variable. Therefore, my click method does not work. Please Help. I need this for my job.
mshtml.IHTMLDocument3 doc = (mshtml.IHTMLDocument3)this.LPBrowser.Document.DomDocument;
doc.getElementById("newlink");
mshtml.IHTMLElement a;
a = (mshtml.IHTMLElement)doc; //Casting here but a becomes null
a.click(); //null.click() so this doesn't work
Thanks.
Abdul Asif.
|
|
|
|
|
The getElementById method returns a reference, it doesn't convert the doc variable into an element reference.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi all guys,
I am building one eFlowchart whose work is similar to normal paper flowchart.There are lots of picturebox ctrl on eFlowchart.I hav to allow author to connect all picturebox with its connector.
But main problem is how to move picturebox smoothly with mouse cursor.I am using mouse_down and mouse_move event.
I have taken click coordinates in mouse_down event with e.x and e.y and then making plus-minus in mouse_move event, but still I am getting slight a bit roughness in ctrl movements.ctrl in design time in visual studios are very smooth,I wanna that type of smoothness.
Pls help
Thank you guys.
Regards
Chintan
www.visharadsoft.com
(I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)
|
|
|
|
|
|
Hi abhijit
Ya, you are correct tht I had already posted the question and also got the solution frm u,but all this I had programmed for child picture boxes on form control, but now as my requirement got change, I have to move every child picturebox on picture box ctrl ( instead of form control ).
When i move the child picturebox on picture control from xy1 location to xy2 location then picture looks like blur ( it seems that its own ghost is following at each mouse_move event).I am not getting the smotheness in dragging.
pls reply
thx
Regards
Chintan
www.visharadsoft.com
(I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)
|
|
|
|
|
I want to wrap an object and add properties to that object's properties.
IE, I currently consume an object called Song. Song has a property called Artist.
I happen to know that the Artist can only be 256 chars long. But I want my code to be able to refer to that value programmatically, like this:
Song myTune = GetSong("Hello Dolly");
int x = myTune.Artist.MaxLength;
How can I do this? How do I "add" a property to the existing property of an object? Is that allowed syntactically?
|
|
|
|