|
Check this ....
<br />
SELECT data FROM table WHERE customer_name NOT LIKE '%john%' <br />
hope your customer_name column is of Char datatype or contain john along with some more characters
Regards
KP
|
|
|
|
|
Obviously not that important then as you have not responded to my questions in an attempt to help you.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
again I am sending the same problem but this time I searched in google for the code,and use the code that I got from this forum
what I have found i am sending,
---------------------------------------
CrystalReport1 report=new CrystalReport1();
report.ReportOptions.EnableSaveDataWithReport = false;
CrystalDecisions.Shared.TableLogOnInfo myLogin;
CrystalDecisions.Shared.ConnectionInfo oCRConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();
foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";
myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);
}
OleDbConnection oleConn = new OleDbConnection("Provider=sqloledb; data source = .; initial catalog = inventory; user id = sa; password = 123456");
oleConn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from student",oleConn);
DataSet ds=new DataSet();
da.Fill(ds);
CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument;
myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
myReportDocument.Load(@"C:\Inetpub\wwwroot\temp\CrystalReport1.rpt",CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
myReportDocument.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource =myReportDocument;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.DisplayToolbar = true;
CrystalReportViewer1.DisplayGroupTree = false;
oleConn.Close();
I did not got any error but my crystal Report Viewer contains no data i.e. it contains only Crystal Report Toolbar ,no data(Blank Report)
If I use F11 to run step by step ,I found the execution did not enter in the following Code.
foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";
myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);
}
What urgent modifications I need to perform?
Help me.
I am using .Net version 2003.
|
|
|
|
|
this problem already this in this forum,but my problem still be there,I googled the following code, and try to run,but did not work.
---------------------------------------
CrystalReport1 report=new CrystalReport1();
CrystalDecisions.Shared.TableLogOnInfo myLogin;
foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.UserID = "sa" ;
myTable.ApplyLogOnInfo(myLogin) ;
}
CrystalReportViewer1.ReportSource=Server.MapPath("CrystalReport1.rpt");
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
CrystalDecisions.Shared.DiskFileDestinationOptions diskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
report.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
report.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
diskOpts.DiskFileName =Server.MapPath("Output.pdf");
report.ExportOptions.DestinationOptions = diskOpts;
report.Export();
Response.AddHeader("Content-Disposition","attachment;filename=Output.pdf");
Response.ContentType = "application/pdf";
Response.WriteFile("C:\\Inetpub\\wwwroot\\temp\\"+ "Output.pdf");
Response.End();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = false;
Download option is comming,when trying to open that pdf file after downloading or just trying to open.
Error Meassage is
......
"There is an error Opening this Document.The File is damaged and could not be Repaired."
---
NOTE::: In Crystal Report Viewer the data is showed.
How can I solve that.I am using .Net version 2003
|
|
|
|
|
hi all, i thought this was the right place to post this Question about access. i have a report that is Ouputed as snapshot file,and it designed in MS Access. and when i run the Report i get the report without line, and it supposed to have lines as i have Displayed in the images i have sent. how can i do the other one to have lines. links to my Screen shots here
http://www.vbforums.com/attachment.php?attachmentid=62181&d=1202730083[^]
http://www.vbforums.com/attachment.php?attachmentid=62182&d=1202730099[^]
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi
does any1 know how to enable remote connection for sql server 2000?
thanks
|
|
|
|
|
Difference between VARCHAR(100) and NVARCHAR(100) type variables ?
Thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Just Google for 'nvarchar varchar'
|
|
|
|
|
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
This may sound a bit weird...
But I need to find the data that does not match between two tables.
I'm using MySql
Suggestions are welcome
Thanks in advance.
modified on Monday, February 11, 2008 1:41 AM
|
|
|
|
|
If you are using SQL 2005, use the EXCEPT operator to find differences between entities.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Sorry, forgot to mention...
I'm using MySql...
I tried using NOT IN but it returns empty...
|
|
|
|
|
What code have you tried?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Something like this...
Search from tableA where id NOT IN (search id that match between tableB and tableA)
|
|
|
|
|
Assuming that you are working with Sql Server, you may try
Select A.[ColumnName],B.[ColumnName2] from table1 A,table2 B
where A.[PKColumn] <> B.[FKColumn]
Give a man a fish, he'll eat for a day. Teach a man how to fish, he'll eat for lifetime.
Pradeep Joe
|
|
|
|
|
Hi,
Say I have the table below:
Tabl1
PKey ColA ColB ColC
1 a1 b1 c1
2 a1 b2 c2
3 a1 b3 c3
... a2 ...
...
... a3 ...
...
If I group by ColA with the select statement as follows:
SELECT<br />
ColA, MAX(ColB), <br />
FROM<br />
Tabl1<br />
GROUP BY<br />
ColA
If for example for a1 the MAX(ColB) is b2, THEN I would like to include ColC in the select statement such that for a1 the resulting row would be:
ColA ColB ColC
a1 b2 c2
What is the best way to do this?
TIA!
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
select b.*
from (
select ColA, Max(ColB) as MaxColB
from Tabl1
group by ColA
) as a
Tabl1 as b
on b.ColA = a.ColA
and b.ColB = a.ColB
order by b.ColA
|
|
|
|
|
Hi all
I have two DB tables and i want to transfare data from one to another table by some criteria
the first table originalMsg and the other on named as Accepted_nick_name
iwant to select all nick name msg from the originalMsg and insert them to the Accepted_nick_name table
originalMsg
-----------
hi all
Record :timo
its me
Record:Tiko
hi every body
Accepted_nick_name
------------------
Record:timo
Record:Tiko
i do this by this sql query
INSERT INTO Accepted_nick_name (Nickname)
select original_msg_txt from originalMsg where
origainal_msg.original_msg_txt like '%record%'
Thats great and its working but i want the result as
Accepted_nick_name
------------------
timo
Tiko
without the Record word
so how can i modify this word from the set of date to be as i show
plz help me & Thanks alot
Kisha
modified on Sunday, February 10, 2008 4:38 AM
|
|
|
|
|
Use the T-SQL REPLACE function to remove the literal string 'Record:' from your text.
Is it actually necessary to store the string 'Record:' in each record value? What purpose does it serve? It looks like your database design may be broken and could do with normalization.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thank's for your attention , my DB is well normalization. but its my work requierment
thank's alot for your time
Kareem Elhosseny
|
|
|
|
|
Thank's my dear Paul it works
thanks alot
Kareem Elhosseny
|
|
|
|
|
Dim Client As New WebClient()
Client.DownloadFile("http://www.yahoo.com", "D:\abc\yahoo.html")
when i run this code i am getting out put yahoo.html page when i run this code local host
if i host in remote server i want to download the same page in D:\ or any other directory what i need to give the path.
i getting exception when i run the same code in server.
i am getting out put successfully , when i run local host , pleasee any one can give me solution for this, i want to download file in my local phisical directoy, when i host my dotnet application in remote system.ing the webclient
This is haneef.............................................................
|
|
|
|
|
Don't double-post. It's rude.
Anyway, why did you think it was a good idea to post your question in the SQL forum. Your question has nothing to do with SQL. Next time, I suggest you engage your brain and think for 5 seconds before you post.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Do NOT post the same question in multiple forums. Doing so is considered very rude around here and on other sites as well. And, as you've found out, it doesn't get your question answered any faster.
BTW, what does this have to do with SQL??
|
|
|
|
|
Hi people.This is Amitav Guha From Bangladesh.
How can i deploy a SQL database after designing it?
Can anyone plse answer me.
|
|
|
|