|
Christian Graus wrote:
Does VB not test equality with == ?
nop, this operator doesn't exist in vb...
the assign operator is the same as the equality one...
you so understand that you cannot assign in an if statement as we could do in C/C++ with : if ((var1 = var2) == 3) ...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
gharryh wrote:
But this doenst work. Can anyone tell me why.
well, have you tried using breakpoints ?
does it enter into the first if ?
is the DataList correctly populated ?
use the debugger to see...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I tryed to read the debugger data but my knowledge of .NET is not that good.
If i read it correct the thing i want is not possible but how can i then check on a value in a database column.
Show Detailed Compiler Output:
c:\windows\system32\inetsrv> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\windows\assembly\gac\system.web.ui.mobilecontrols.adapters\1.1.0.0__b03f5f7f11d50a3a\system.web.ui.mobilecontrols.adapters.dll" /R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\kiddinsys\80c4fe54\a4ec71ea\owog6cgo.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\kiddinsys\80c4fe54\a4ec71ea\owog6cgo.res" "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\kiddinsys\80c4fe54\a4ec71ea\owog6cgo.0.vb"
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
C:\Inetpub\KiddinSys\aa.aspx(52) : error BC30456: 'Column' is not a member of 'System.Web.UI.WebControls.DataList'.
If DataList1.Column("Geslacht") = 1 Then
|
|
|
|
|
how can i change an identity seed of a colomn via transact sql.
that colomn is primary key in relation ship between other tables.
i need to change its identity seed in my application by transact sql.
when i want to change it, the table is empty but the user should detemine it or change it to other value, by my application.
prog
|
|
|
|
|
I don't think you can change the seed of a column. You must drop the column (in an alter table statement) and recreate it with the new seed and increment. Of coarse, you must first drop the relationships before you can drop the column.
1. use ALTER TABLE to delete the foreign key relationship in the other table
2. drop the identity column using ALTER TABLE
3. add the identity column back with the seed and increment you want using ALTER TABLE
4. add the relationship back into the other table using ALTER TABLE
Not a pleasant operation. In general, it is not good to use an identity column if you are expecting particular values; it might be better to design a stored procedure to generate the values you want, and put them in an ordinary int column with a UNIQUE constraint.
|
|
|
|
|
I have a 1 row record with several columns SectB1, SectB2, SectC1, SectC2 etc. In SectA1 cell, I have something like M1Y1472: All I want to do is to have |M|1|Y|1|47|2, that is eveything in its column. The same hing has to happen to SectB2, SectC1, SectC2 etc. Finally, I will have something like:
B1 B2 B3 ....C1 .....Cn
M 1 2
F 1 1
F 1 1
M 1 1
M 5 2 1
M 6 2 1
F 2 1
thank you
phokojoe
|
|
|
|
|
What are you trying to do? I don't understand.
<italic>Work hard, Work effectively.
|
|
|
|
|
I have a table with rows and columns. In a column, say A I have cell contents as 12345 etc.
That is i have something like:
Column
Row 12345
Now what I want to do is to separate the numbers in that cell as in 1 23 4 5, so that 1 is in its column, 23 in its column, 4 in its column 5 in its column but all in the same row:
Column1 Column2 Column3 Column4
Row 1 23 4 5
If I can be helped in that one cell, I think I will be able to handle the other cells.
help needed urgently!
phokojoe
|
|
|
|
|
What's the pattern? Why does 1 in its column and 23 in another column?
<italic>Work hard, Work effectively.
|
|
|
|
|
I have a table with rows and columns. In a column, say A I have cell contents as 12345 etc.
That is i have something like:
Column
Row 12345
Now what I want to do is to separate the numbers in that cell as in 1 23 4 5, so that 1 is in its column, 23 in its column, 4 in its column 5 in its column but all in the same row:
Column1 Column2 Column3 Column4
Row 1 23 4 5
If I can be helped in that one cell, I think I will be able to handle the other cells.
help needed urgently!
phokojoe
|
|
|
|
|
Maybe you can do it in your code. You save the data as 1,23,4,5. Read the data, when "," is found put it into the next column. I can't help much, if you didn't give more information.
<italic>Work hard, Work effectively.
|
|
|
|
|
Ok! Thank you for responding. All I can say for example column1 will hold Gender, Column2 will hold Age, column3 will hold say Position"
Initially, I have:
Column
Row 12345
And like I said all I want is a procedure or a way of having it like this:
Gender Age Position Class
Row 1 23 4 5
I hope this time I have made it clear.
Thanks once again!!
phokojoe
|
|
|
|
|
For that you can use,
insert into tableName(gender,age, position, class) values (1,23,4,5)
Why do you want to separate it, when you can do it easily with the way above?
<italic>Work hard, Work effectively.
|
|
|
|
|
It looks like you do not understand. What I am saying is that my dataset is in this form: Column(Data)
Row 12345
which is (Gender age position and class concatenated together).
that is I have in a cell column a data in that form and all I want to do is to separate the contents of the column(Data) to separate that and have
Gender Age Position Class
Row 1 23 4 5
I think now it makes more sense.
The insert statement I have used it many times and have no problem with that.
phokojoe
|
|
|
|
|
Is the problem solved? What I'm saying is you don't need to save the data in 1 column, if you have gender, save it in the gender column, etc. You're just making trouble for your self. I hope, I didn't miss understood you.
<italic>Work hard, Work effectively.
|
|
|
|
|
Thanks Yulianto. I will try not to create trouble for myself. The reson why I had that kind of a situation is that, I used a scanner to capture data , so in my questionnaire design, I had group the variables like that so as not to crowd the questionnaire.
Thank you
phokojoe
|
|
|
|
|
Yulianto
Can you show me a line of code whereby if I have data stored in as 1,2,3,4 and I want to read data set, when I find "," I put it in a next clolumn. Sy, when read a data set 1 when i find "," i put 1 in the next column.
phokojoe
|
|
|
|
|
phokojoe wrote:
read data set, when I find "," I put it in a next clolumn
Are you going to save from the data set? I don't get it.
<italic>Work hard, Work effectively.
|
|
|
|
|
I will read that data from a table and then save it to another table. I think the code that you are going to show me, I will create a stored procedure and then run it to save it to another table.
I think, I have made my point clear.
thank
phokojoe
|
|
|
|
|
You're stil making trouble for your self.
Anyway, use PATINDEX , to get the string between comma.
If your string 'a,b,c' then, the first PATINDEX will get 'a', the second will get 'b', and so on. Then you can update/copy the field using the value you got.
Here's the basic code:
declare @name varchar(15)
set @name='agf,b,c'
select substring(@name,1,patindex('%,%',@name)-1)
<italic>Work hard, Work effectively.
|
|
|
|
|
Thank you. it worked
phokojoe
|
|
|
|
|
I am trying to learn how to do a running total in Reporting Services. I have gone to the msdn website, but get bounced around from link to link. I just need a point in the right direction to learn how to do this please!
Scott Moore
|
|
|
|
|
I am trying to do a sql with wildcards in the "LIKE"
I tried _ and ? they wont work. * and % are working fine but i want some thing to match a single character. example
LIKE _ean
should return sean but it doesnt
any ideas????
Cheers
|
|
|
|
|
What do u mean by didn't work?
Can you post your code and the undesireable results ?
|
|
|
|
|
I am using the SQL Server Reporting service for creating the Reports but I am unable to create the Sub reports using the same. I've set the parameter property but the subreport is not visible in runtime. Can aybody have any idea how to create the Sub Reports.
Prashant Shinde
|
|
|
|