|
|
Notify when a special partition in analysis service must update?
how i can triger a program to update a special partition of a cube at a required time?
or
how to found a way to know if a special partition need to be update?
thanks
|
|
|
|
|
when you want to connect to the db in the server do i have to use sqloledb provider , can't i use sqlclient provider.
|
|
|
|
|
http://wwww.connectionstrings.com
I Love SQL
|
|
|
|
|
you want to add port on firewall port number = 1433 to you can use sqlclient
Rami Abdalhalim
|
|
|
|
|
sqlclient uses a an ole connection and you can use to connect it to SQL Server, this is the prefered method and is used in most examples.
|
|
|
|
|
dear friends,
I develop an Win application by using MS Access.I have got a problem in SQL statement.I have got a form that has
got 2 ComboBox and a DataGridView.The name of the first is cmbCategories and the second one is cmbContent.Content
is listing the content of categories.I use an array to transfer letters when I choose the category in
cmbCategories as it is Alphabetical Array.When I choose a letter from cmbContent like A,B or another one,but no
records is listing in the DataGridView.I try to use "Like" statement for this action.It is like this:
string strSQL = "select FilmName from films where FilmName like" + "'" + cmbContent.Text + "*'";
cmbContent has got the Alphabetical letters by sequence.I want to list the FilmName that is beginning as
alphabetic.For example,when I choose letter A,the films begins A must be listed.Does anybody help me?Thanks for
your help.
|
|
|
|
|
string strSQL = "select FilmName from films where FilmName like '" + cmbContent.Text + "*'";
I Love SQL
|
|
|
|
|
You should use parameterized SQL commands to prevent SQL injections...
|
|
|
|
|
I tried,but it doesnt work.I wrote the whole code below.maybe it helps what I want to do.
private DataView Get_DataAlphabetic()
{
string constr = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" + Environment.CurrentDirectory + "\\mdb\\film_db.mdb";
OleDbConnection con_ole = new OleDbConnection(constr);
string strSQL = "select FilmName from films where FilmName like " + "'" + cmbContent.Text + "*'";
OleDbDataAdapter da = new OleDbDataAdapter(strSQL, con_ole);
DataTable dt = new DataTable();
da.Fill(dt);
DataView dv = new DataView(dt);
dv.Sort = "FilmName ASC";
da.Dispose();
con_ole.Close();
return dv;
}
I send it to a datagrid's datasource property in another method as I use cmobobox's SelectedIndexChanged method.Hope it is clear.I wait for your replies
-- modified at 5:58 Monday 10th September, 2007
a
|
|
|
|
|
Why you aren't trying to use Filter instead of getting directrly from database.
Download all data at first time from database then use filter property.
I Love SQL
|
|
|
|
|
thanks buddy maybe sometimes you must look at it in a true point.I have done it.
Thnx.
a
|
|
|
|
|
You are welcome...
I Love SQL
|
|
|
|
|
zmskerem wrote: "*'";
Try a percent sign (%).
|
|
|
|
|
Database is Access, not SQL and condition % always return null value.
Instead of % is used *
I Love SQL
|
|
|
|
|
hi friend
you are right there is mistake in sql please correct it
right
string strSQL = "select FilmName from films where FilmName like '" & cmbContent.Text & "%'" ;
wrong this is your
"select FilmName from films where FilmName like" + "'" + cmbContent.Text + "*'";
|
|
|
|
|
rohitsrivastava wrote: right
string strSQL = "select FilmName from films where FilmName like '" & cmbContent.Text & "%'" ;
false
_________________
rohitsrivastava wrote: wrong this is your
"select FilmName from films where FilmName like" + "'" + cmbContent.Text + "*'";
true
I Love SQL
|
|
|
|
|
|
Hi there .
I have a problem with SqlServer 2005 Log file .
I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error.
I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error:
"Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)".<br />
Could not open new database 'DbName'. CREATE DATABASE is aborted.<br />
Cannot attach the file 'FilPath.mdf' as database 'DbName'.<br />
File activation failure. The physical file name 'filpath_log.LDF' may be incorrect.<br />
The log cannot be rebuilt when the primary file is read-only.'
I wonder to say sometimes attachment works but sometimes not.
I already did this attachment process with SQLServer 2000 and it never gives me error .
DMASTER
|
|
|
|
|
What are you trying to do ?????
Load a log file via a connection ????
|
|
|
|
|
hello friend
where u get the back of data base it is not saved full some thing is missing so again take back up and there is no error tell me how to creat database with sqlscript or enterprisemanager if u take backup of enterprisemanager is best this is the
step
(1) open Enterprisemanager
(2) right click on database name
(3) All Task
(4) Attach database
(5) MDF File database to attach (Browse the path)
(6) click mdf file and ok button
you have succesfully attach in the server database
then your problem is solve connection to database coding
have a nice day
|
|
|
|
|
i have a table with a tree organiz.
each record have a unic id and a parent id that refrenc to aanother id on this table. so each record have a parent or more
i want to find the fulll path of a record such as :
human/body/leg
i want to do it with a function in mysql;
every one can help me?
-- modified at 7:44 Sunday 9th September, 2007
sepel
|
|
|
|
|
Use Recursive function each time it add parent untill the parent is null.
Best Regards,
Chetan Patel
|
|
|
|
|
Hi
I am using a MySql 5.0 DB. am trying to implement a transaction inside a stored procedure which uses cursors. but the problem is the way the cursor closes it self. it throws an exception, i have written a handler for any sqlexception inside the procedure which simply rolls back, and because of the cursor , transaction gets rolled back without completing the task.
Has anybody ever worked on MySql with transactions. Please Help.
thanks
KSS
|
|
|
|
|
Hi,
the following stored procedure will work properly with transactions and cursors:
DELIMITER $$
DROP PROCEDURE IF EXISTS `testdb`.`TestCursorRollback` $$
CREATE PROCEDURE `testdb`.`TestCursorRollback` ()
BEGIN
declare n int;
DECLARE done INT DEFAULT 0;
declare cur1 cursor for select col1 from hotels.a;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
start transaction;
open cur1;
repeat
fetch cur1 into n;
if not done then
insert into testdb.b(col1) values (n*10);
end if;
UNTIL done END REPEAT;
close cur1;
rollback; /* or commit*/
insert into testdb.b(col1) values(200);
END $$
DELIMITER ;
|
|
|
|