|
Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I'm trying to page a recordset, but in one case I have a problem. The code looks like:
<br />
sSQL = "SELECT Table1.*, Table2.* " &_<br />
"FROM Table1 LEFT JOIN Table2 ON Table1.Name = Table2.Name"<br />
rec.CursorLocation = adUseClient<br />
rec.CacheSize = 25<br />
rec.PageSize = 25<br />
rec.Open sSQL, con, adOpenForwardOnly, adLockReadOnly<br />
In case that the Table1.Name exists in Table2.Name, all is working correct. But if not... I'm getting E_FAIL from Microsoft Cursor Engine when I'm trying to do anything with returned Recordset. Though without paging and having a client cursor, it works fine.
Any ideas what is going on and how to fix it?
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Hi,
When i try to install DAO components (Jet 3.5) on Windows NT WorkStation or Server, the following error message appear:
Another application is currently using JET file, close all applications and continue.
I try to follow the resolution method ( Q169497 ) to resolve this problem but it don't work.
Anybody can help me to solve this problem?
Thanks in advance
Cheickna
|
|
|
|
|
What is sinfully wrong with the below implementation?
I am just doing some simple learning experiments and the below code is 2000 times slower then using MySQL's api. If that kind of difference was typical no one would be using ADO. So I assume it is missing something standard.
CADODatabase MyADO;
CString ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};\
SERVER=localhost;\
PORT=986;\
DATABASE=genealogy;\
USER=user;\
PASSWORD=pass;\
OPTION=4;";
if(MyADO.Open(ConnectionString))
{
Person *MyPer;
long int pnum = Persons.GetSize();
long int newid;
long int i;
CString sql;
for (i=1;i<pnum;i++)
{
MyPer = (Person*)Persons[i];
if(MyPer!=NULL)
{
sql.Format("INSERT INTO ind VALUES (%d,'%s','%s','%s',%s,%s,%d);",
MyPer->id,MyPer->first,MyPer->last,MyPer->sex,NULL,NULL,0);
MyADO.Execute(sql);
}
}
MyADO.Close();
}
Good ideas are not adopted automatically.
They must be driven into practice with courageous patients. -Admiral Rickover. ...
|
|
|
|
|
Hallo,
I write into xls file. I try to create new table but I have problems with few characters in header.
Do you know how to write "[" and "]" character into headr - field name?
And when I need to write upper delta character?
Thanks, Alex.
|
|
|
|
|
Just wondering if anyone can help me. I've written quite a few queries now, but I was wondering if I could do this with a single query;
I have four tables in Access;
tblJobs ( ID, ... )
tblAreas ( ID, ... )
tblSchedule ( ID, JobID, AreaID, ... )
tblJobAreaLink ( JobID, AreaID ) I have a function in the program to delete a job record, and I want to be able to automatically delete all related records in the tables above.
So far I have:
con.Execute "DELETE * FROM tblJobs WHERE ID=" & id
con.Execute "DELETE * FROM tblSchedule WHERE JobID=" & id But I want to be able to delete the areas too - how can I go about this in one statement?
Thanks!
--
Andrew.
|
|
|
|
|
Use the "Relationships" tool to define JobID and AreaID as foreign keys, and set "Cascade Delete Related Records" on the relationships.
|
|
|
|
|
Unfortunately due to the requirements of the program, I can't employ this option. Thanks anyway though!
--
Andrew.
|
|
|
|
|
I want to know how to process a Word document using VBA.Can you tell me where are the information?thank you!
Besides VBA,which tools can do the same work,SQL?C++builder?
If you can find information about this,please tell me.
For i know little English,I hope you can tell me the particular web sites.Thank you very much!
huang chun shen
|
|
|
|
|
I want to know how to process a Word document using VBA.Can you tell me where are the information?thank you!
Besides VBA,which tools can do the same work,SQL?powerbuilder?
If you can find information about this,please tell me.
For i know little English,I hope you can tell me the particular web sites.Thank you very much!
|
|
|
|
|
What's wrong with this code:
OleDbConnection thisConnection=new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Inetpub\wwwroot\First\Testing.mdb");
thisConnection.Open();
OleDbDataAdapter thisAdapter = new OleDbDataAdapter(
"SELECT * FROM Table1", thisConnection);
OleDbCommandBuilder thisBuilder = new OleDbCommandBuilder(thisAdapter);
DataSet thisDataSet = new DataSet();
thisAdapter.Fill(thisDataSet, "Table1");
DataRow myRow=thisDataSet.Tables["Table1"].NewRow();
myRow["Column1"]="mazy";
myRow["Column2"]="Hello everybody!";
myRow["Column3"]=312;
thisDataSet.Tables["Table1"].Rows.Add(myRow);
thisAdapter.Update(thisDataSet,"Table1");
thisConnection.Close();
the exeption thrown for this line:
thisAdapter.Update(thisDataSet,"Table1");----------->Operation must use an updateable query.
Any suggestion??
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
thanks friends,I found it
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I've just got confused,I'm so tired to work on it,it's simple question.
I want to add new row to database.I use DataSet ,I want to add it to both datasource and my DataSet.Please give me an example.I don't know if I should use sql command or other things.
thanx
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
thanks friends,I found it
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hi All,
I am new to this SQL.I have a Database in SQL.Through VC++ Program I want to get all the Tables in that Database.How is it possible .
Please Help
|
|
|
|
|
Well, I'm assuming you're using SQL Server - if you're not using SQL Server its going to be database specific. Here you go:
select [Name] from sysobjects where xtype = 'u' order by name
Andy Gaskell, MCSD MCDBA
|
|
|
|
|
I want to display the tables from a database in SQLSErver..
So what is this[Name] to be given??
what is this Xtype??
|
|
|
|
|
Ok, I haven't used ADO with C++, so if you're having trouble even connecting to a database I can't help ya, sorry.
But if you have the SQL Server Client Tools installed you can copy that string into Query Analyzer and run it. I swear it works
Andy Gaskell, MCSD MCDBA
|
|
|
|
|
Thank you very much..
I tried it in the SQLClient..I got the answer..Now I am trying to get the value throught my VC++...
Thank you very much
Sangeetha
|
|
|
|
|
I want to display the tables from a database in SQLSErver..
So what is this[Name] to be given??
what is this Xtype??
|
|
|
|
|
I have a Word document.I want to input this document to a
database.Generally,i will create a table in a database,then input a
column ,then input next column. In order to save my time,now i want to
input the whole Word document by a program.
please tell me some English information about this.Or tell me web
sites.Thank you!
huang chun shen
|
|
|
|
|
How can I restore a Database which is taken by using Backup option in SQL Server into a machine which is running the MSDE.
|
|
|
|
|
vcsekhar wrote:
How can I restore a Database which is taken by using Backup option in SQL Server into a machine which is running the MSDE.
You can do it using the normal restore operations in Enterprise Manager.
|
|
|
|
|
But, there is no Enterprise Manager available with MSDE. Is there any command line tool for doing that?
--vcsekhar
|
|
|
|
|
You could use the T-SQL Command RESTORE DATABASE
Dave.
|
|
|
|