|
Hi,
Do you mean that you don't see rows that do not have value for City-column? If that's the problem, modify your condition:
Dataview.Rowfilter = "City = 'Berlin' OR City IS NULL OR City = ''";
(if both NULL and empty strings should be returned)
Mika
|
|
|
|
|
Thanks,
thats a good idea.
Let me check it tomorrow.
Greetings
CoLa
|
|
|
|
|
You're welcome
Mika
|
|
|
|
|
it works not yet perfect. Let me explain.
I have 4 Records:
----------------------------
1| <city>Berlin
1| <street>Alex
1| <zipcode>10117
----------------------------
2| <city>Berlin
2| <zipcode>10117
----------------------------
3| <city>Paris
3| <street>LyonAvenue
3| <zipcode>90865
----------------------------
4| <city>Paris
4| <zipcode>90865
----------------------------
I want to display Record 1 + 2 at the same time.
Now i filter the Records where City = 'Berlin'
If i use the Statemnt
"City LIKE '%Berlin%'AND Street is null" Display Record 2
"City LIKE '%Berlin%'AND Street is not null" Display Record 1
"City LIKE '%Berlin%'OR Street is null" Display Record 2 + 4
Have you any idea?
Thanks in Advance
CoLa
|
|
|
|
|
Hi,
i have the Solution.
It was my mistake. I had the follwoing statement an this was false.
"City LIKE '%Berlin%'AND Street is not null AND Zipcode is not null"
the right statement in this case is:
"City LIKE '%Berlin%'AND Street LIKE 'Alex'" if i want to see all records with City = Berlin
i must use this Statement
"City LIKE '%Berlin%"
Thanks for your help.
CoLa
|
|
|
|
|
Yes, that's exactly correct. Glad this solved.
Mika
|
|
|
|
|
|
|
Hi, I have an image in memory as an RGB array, I need to make a fast copy of it?
I access the image in usafe mode using the following pointer byte* p = (byte*)(void*)pBuffer; I need another copy of the data so that I can create a new pointer to it and leave my origional data unaffected.
Thanks...
|
|
|
|
|
I guess you can use System.Runtime.Interop.Marshal.AllocHGlobal to do that. I wouldn't do this in managed code at all but I guess it should work.
led mike
|
|
|
|
|
SELECT product.name AS Name, product.modelNo AS [Model No], product.[desc] AS Description, category.categoryName AS Category,
product.MRSP AS MSRP, product.retailPrice AS [Retail Price], product.[image] AS Img
FROM (category INNER JOIN
product ON category.categoryID = product.categoryID)
When this is being showed on my datagrid, the retail price and msrp is not in currency format. How do i make it either adding a $ sign infront OR having it to be 2 decimal place
|
|
|
|
|
This has nothing to do with your SQL query. You need to learn how to use the datagrid specifically how to format things. I suggest you find some beginner articles about using the DataGrid. I imagine there are some here on CodeProject. If you are trying to use the ASP.NET DataGrid you might also want to check out the DataGrid Girl's web site.
http://www.datagridgirl.com/[^]
led mike
|
|
|
|
|
Hello,
I wonder if it is possible to execute some lines of code, which are stored in a config-file, e.g. textfile.
I guess there is a way using Reflection, so could anyone give me a hint on where to start?
Thanks in advance.
|
|
|
|
|
buchstaben wrote: I guess there is a way using Reflection, so could anyone give me a hint on where to start?
This Article[^] might be as good a place to start as any
led mike
|
|
|
|
|
Hello,
I have several high-res (600dpi) TIFF files. I need to stitch these files together into one new high-res (600dpi) TIFF file. I got it working with the standard resolution (96dpi) but i can't get it to work with 400 or 600 dpi. Any help would be welcome!
This is the code i have so far:
Bitmap bmp = new Bitmap((int)imagewidth, (int)imageheight, PixelFormat.Format24bppRgb);
bmp.SetResolution(600, 600);
Graphics g = Graphics.FromImage(bmp);
int startpoint = 0;
for (int x = 0; x < bands.Count; x++)
{
string file = bands[x].ToString();
Bitmap tmp = new Bitmap(file);
g.DrawImage(tmp, startpoint, 0, tmp.Width, tmp.Height);
startpoint = startpoint + tmp.Width;
}
bmp.Save("c:\\bands\\alltogeher.tif", ImageFormat.Tiff);
Thanks, Ben
|
|
|
|
|
bverp wrote: I got it working with the standard resolution (96dpi) but i can't get it to work with 400 or 600 dpi.
What is the error you are getting?
|
|
|
|
|
Parameter invalid. It doesn't say much about the error.
|
|
|
|
|
bverp wrote: Parameter invalid. It doesn't say much about the error.
Yeah, they are normally not very helpful in GDI+.
I suspect .NET does not support such large DPI on images.
|
|
|
|
|
Which line is the error occurring on?
What are the values of the parameters when that line is executed?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
There AIN'T no f&^*in french fries!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I get the Parameter is not valid error on line:
Bitmap bmp = new Bitmap((int)inputwidth, (int)inputheight, PixelFormat.Format24bppRgb);
The inputwidth is 16762 and the inputheight is 23258.
Thanks, Ben
|
|
|
|
|
I tried the following code on Vista (2GB RAM) and it worked fine
(took some grinding to create and compress that big image though! )
int imagewidth = 16762;
int imageheight = 23258;
Bitmap bmp = new Bitmap((int)imagewidth, (int)imageheight, PixelFormat.Format24bppRgb);
bmp.SetResolution(600, 600);
bmp.Save("e:\\alltogeher.tif", ImageFormat.Tiff);
I would guess either you're not getting enough memory to create that huge
bitmap or you're on a version of Windows that has a GDI+ limit on bitmap
dimensions.
The resolution is added to the bitmap's/file's metadata (for types that support it)
but it doesn't affect the size of the image.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the reply. I tried it on Vista and it works. Do you know a method to get it to work on Windows XP?
Ben
|
|
|
|
|
I'm not sure. Vista has a newer GDI+ version that is not available for
any pre-Vista OSs. I can't find any documented maximum bitmap dimensions
for GDI+.
Are you sure the system is able to get the 1GB chunk of memory needed for that
image? If so, does smaller dimensions work?
I would at least expect it to work with dimensions that fit in a 16 bit signed int,
like GDI.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|