713 Posted Topics

Member Avatar for OblibSystems

Accept the facts friends. There is no magic ring to rule them all. It's just the right tool for the job. Be it SQL or Java or VB there the industry has work for all languages exactly because each one is the right tool for something. Hell you can make …

Member Avatar for sergent
0
391
Member Avatar for springposh
Member Avatar for scrivomcdivo

debasisdas is correct as usual, but may I ask what data types are the 300 columns? If 200 columns are text fields (or any other large data type) and you want them to be searched for some text this might be a challenge for the "hundreds of millions" records. This …

Member Avatar for xuqi
1
126
Member Avatar for cwarn23

I guess it depends on the topic. I don't see how it would help someone to see me type a VB .Net program for them (oh wait it might make it easier to see the changes). I believe that it will take for ever to set up a video recording …

Member Avatar for cwarn23
1
155
Member Avatar for anonimous

You need to show your code. We can't help you if we don't know where you are holding the food type or the quantity or where you want the results. Also you need to show that you've tried. Show your form and explain a bit better what you are trying …

Member Avatar for adam_k
0
2K
Member Avatar for lcfjoertoft

This is an easy way to do it: [CODE]SELECT DISTINCT SP.ANALYSIS AS Analysis,COUNT(SP.ANALYSIS) AS Amount, sum(case when SP.RESULT = 'POS' then 1 else 0 end) AS POS_Count FROM SAMPLE S INNER JOIN SAMPLE_PARTS SP ON SP.SAMPLEID = S.SAMPLEID WHERE S.SAMPLE = '18000' GROUP BY SP.ANALYSIS[/CODE] PS: I'm using sum instead …

Member Avatar for lcfjoertoft
0
154
Member Avatar for sklingb1

Even if you do rename it, the protocol and the settings will be all wrong (Xon/Xoff instead of Bit, Parity, Speed, etc). I think rubberman is right find another application or try to connect your CNC machines via COM if there is such an option. PS: You are saying that …

Member Avatar for adam_k
0
161
Member Avatar for Saharish

You need to change the datasource from your form to a join like this: [CODE]select [Staff Salary].[Staff ID], [Staff Salary].[Basic Salary], [Staff Table].[Staff Name] from [Staff Salary] Left Join [Staff Table] on [Staff Salary].[Staff ID] = [Staff Table].[Staff ID] [/CODE] PS: You shouldn't have a Staff Name in the Staff …

Member Avatar for adam_k
0
98
Member Avatar for sidyusuf

[CODE] For i = 0 To DataGridView1.Rows.Count - 1 DataGridView1.Item(0, i).Value = Mid("11DCE000", 1, 8 - (i + 1).ToString.Length) + (i + 1).ToString Next [/CODE]

Member Avatar for sidyusuf
0
243
Member Avatar for mike_cao

[QUOTE=Netcode;1657756]What database? If MS SQL, you can simply use the below query [CODE]Dim StringCount as string = "SELECT COUNT from CourseEnrolled where Course_ID IN (csc01,csc02,csc03)"[/CODE][/QUOTE] Did you mean [CODE]select count(*) from CourseEnrolled where Course_ID = 'csc01'[/CODE] ?

Member Avatar for Netcode
0
272
Member Avatar for Dumb Fish

urtrivedi's script should work, provided that the where is : [CODE]where year(datecolname) = '2011'[/CODE] or something similar.

Member Avatar for Netcode
0
147
Member Avatar for NetJunkie

You can (and should) encrypt it. If you encrypt it as a file (versus just the contents) then users won't be able to copy/paste it to another computer (except when using Ghost or similar software).

Member Avatar for adam_k
0
423
Member Avatar for Dumb Fish

Not only you are not showing effort, but you are not providing enough to go on. Your 2 tables cannot be joined with the fields that you are providing. Also how do you define top buyers? By quantity, money, number of contracts ?

Member Avatar for Netcode
0
109
Member Avatar for theonebit

if num is always 1, isn't your program stuck in an infinite loop? Anyhow, I just want you to know that you can't possibly write a security module for your app in .Net. No matter what you do - keys, internet authentication, encrypted files or whatever .Net offers next to …

Member Avatar for theonebit
0
206
Member Avatar for jacksantho

There isn't a way to do what you are asking. LIKE won't work since you are looking for <=. What you can do based on your sample is substring like this: [CODE]select * from log where convert(int,substring(log,4,2)) <= 7[/CODE] You also can try your luck without the conversion to int.

Member Avatar for jacksantho
0
106
Member Avatar for ericko10kip
Member Avatar for ericko10kip
0
126
Member Avatar for khentz
Member Avatar for Netcode
0
92
Member Avatar for juniorsilver

it's actually pretty simple. Create a sub with the code you've used to populate the datagrid in the first place and call that sub whenever you want to load data into the datagrid (on form load, after an insert/update/delete or on a button click event).

Member Avatar for juniorsilver
0
2K
Member Avatar for sergent

[QUOTE=LaxLoafer;1633036]Wow, that's amazing! Even if the headline was true, would the increase in processing power make a perceptible difference? When we went from 16 MHz to 32 MHz processors, the performance boost was immediately apparent. Tasks that might have taken 1 minute only took half that time. My human brain …

Member Avatar for AndrewDJ
0
299
Member Avatar for naazsayed

How do you store your connection string? There are a number of ways to store the connection string and it some of them you can include it to the project (settings, xml or ini file, or even registry values that you create in your code if they are not present).

Member Avatar for naazsayed
0
252
Member Avatar for Ehtesham Siddiq

You've said database, which makes me wonder what happens when today = fromdate. Are you be going back to the database and checking for something? What db are you using?

Member Avatar for funkiller
0
455
Member Avatar for haydo

Why can't you do it with conditional formatting (or a macro that set's conditional formatting? for example conditional formating rule for range O50:O57 when value between =max(O50:O57) -2 to = max(O50:O57) To handle the cells with strikethrough it will be a bit hard, but it can be done from VBA.

Member Avatar for adam_k
0
100
Member Avatar for jacksantho

This will add a user to the sysadmin role: [CODE]EXEC master..sp_addsrvrolemember @loginame = 'username', @rolename = N'sysadmin'[/CODE] Hint: If you have MS management studio you can create a user with all the roles (db or server) and instead of hitting OK you select Script from the top of the window …

Member Avatar for adam_k
0
231
Member Avatar for arsheena.alam

What BitBIt is saying is absolutely correct. SQL server is build to manipulate multiple records simultaneously and that's when it will show it's true potential. Back to your problem: The reason why you only get 1 record updated is the use of variable. The variable can hold 1 result and …

Member Avatar for arsheena.alam
0
225
Member Avatar for jbd

It is possible to format your report to show the field names in 1 column and the results in another. If you use the wizard, select columnar layout and it will do it for you or go into design view and drag and drop the fields and their labels in …

Member Avatar for BitBlt
0
108
Member Avatar for erik216

Nope, debasisdas has it correct. If you want all events that started AND ended between a certain period you need to use AND. OP states it [QUOTE] Not use between. Because some event maybe began on 10/9 but end date is over 15/9. So use between can not find out …

Member Avatar for adam_k
0
85
Member Avatar for Shizuo

I really don't understand what the question is. There are a million possibilities for your result sample: [CODE]select employee.emp_id,employee.Emp_Name,attendance.Time_In,attendance.Time_Out from employee inner join attendance on employee.emp_id = attendance.emp_id and time_id = '' and time_out = '' [/CODE] [CODE]select attendance.emp_id,attendace.Emp_Name,attendance.Time_In,attendance.Time_Out from employee left join attendance on employee.emp_id = attendance.emp_id where attendance.emp_id …

Member Avatar for adam_k
0
152
Member Avatar for dakaboguy

I haven't really used this, but if I remember correctly you should use something like: [CODE]for each ctrl as Control in Me.Controls if typeof ctrl is textbox then 'your code here end if next [/CODE] I'm pretty sure you can also check the name of the control, I'll look it …

Member Avatar for dakaboguy
0
751
Member Avatar for srinidelite

Is your database called ADODB ? Check your connection string here: [url]http://www.connectionstrings.com/[/url]

Member Avatar for adam_k
0
449
Member Avatar for PixelatedKarma

Also a good advice is to not trust the next or the previous layer and always verify then input. After all even encrypted dbs in the most secure environments can be cracked open with SQL injection.

Member Avatar for Stefano Mtangoo
0
148
Member Avatar for jovillanuev

The TOP will result in only 1 record from the entire query. If you want all esns - whatever that is - with the supplierid and the latest shipdate then you must use something similar to: [CODE] Select vp.esn, us.supplierid, us.shipdate From Table1 as vp with (nolock) Left Outer Join …

Member Avatar for jovillanuev
0
162
Member Avatar for Ehtesham Siddiq

Cross join without a where is supposed to deliver a cartesian product: [url]http://msdn.microsoft.com/en-us/library/ms190690.aspx[/url] You should join your tables using keys that will make unique joins record to record from one table to another. You could find that the same result is for now achieved using a distinct ie: [CODE]select distinct …

Member Avatar for Ehtesham Siddiq
0
301
Member Avatar for Ehtesham Siddiq

If your loop is working, perhaps your problem is not the loop, but the way you read data from your datagridview. Please post what is inside the loop.

Member Avatar for Ehtesham Siddiq
0
325
Member Avatar for shivya jain

The checkbox.checked (=True or False) is a pretty good way. [CODE]"insert into table (field1) values ('" & checkbox.checked.tostring & "')"[/CODE]

Member Avatar for adam_k
0
108
Member Avatar for ravi035

You will need to explain a bit your requests. By altering multiple columns, you mean update? Will the columns be fixed or are they to be passed as parameters (if this is the case, will the table also be a parameter?). Will the proc accept criteria as a value to …

Member Avatar for prit005
0
71
Member Avatar for folberlin

If you need the sproc to fire every time the table gets updated, why don't you use a trigger? As for the single portfolios, add STR_BRANCH_BB618FB1 to your select and group by. PS: Good luck remembering table and field names.

Member Avatar for adam_k
0
205
Member Avatar for bklynman01

This might be silly, but: How is your combobox getting it's values? Could it be that you've got a background worker or something running when you are checking for row(0) and the msgbox is just giving the necessary time for the operation to complete?

Member Avatar for bklynman01
0
363
Member Avatar for uselessninja

I've seen good and bad implementations of both solutions. How many records are we talking about? Is there a need to insert records before the "last" (either retrieve something from archive or a delayed insert from a mobile client) and how often? There are a number of parameters for going …

Member Avatar for uselessninja
0
1K
Member Avatar for ruba_cti

Why use VBA? This is a pretty simple query, which can run as a query and update or show or whatever. You can create a new query from Query Design and instead of selecting tables and fields, switch to SQL view and put in [CODE]Update table_name Set col_name = Right(col_name, …

Member Avatar for ruba_cti
0
177
Member Avatar for TIP.Synergy
Member Avatar for mikejs

Usually when we set AutoGenerateColumns = False we plan to create the columns manually. [CODE]DataGridViewSearchPrev.columns.add( column )[/CODE] You wouldn't have a reason to do so, unless default doesn't cover your needs (i.e. you might want combobox as a column)

Member Avatar for adam_k
0
122
Member Avatar for Singlem

Subquery without the aggregate and aggregate the results: [CODE]select field1, sum(field2) from (select field1, field2 from table1) a group by field1[/CODE] Just make sure that you've named all your fields in the subquery.

Member Avatar for BitBlt
0
654
Member Avatar for jacksantho

[CODE]select * from (select FirstName, LastName, ROW_NUMBER() over (order by LastName,FirstName) as 'Row' ) a where Row >=11 [/CODE] Pretty much the same thing as jbisono's query.

Member Avatar for adam_k
0
330
Member Avatar for aplee

If your table contains different dates with different status for example and you group by status - or any other field for that matter - then you won't get the "latest version" of your project. You will be getting the maximum date per unique record. If this is not what …

Member Avatar for adam_k
0
165
Member Avatar for mikejs

If a user joined Jan 30th, then what would the due date be for February? If I join tomorrow (Sep 31st)? It can be a tricky business to calculate dates on your own, but you can create a string with the day, month and year that you like and convert …

Member Avatar for adam_k
0
135
Member Avatar for jovillanuev

If your Cast is working, then I don't see a problem. [CODE]Select ItemNumber, PurchasePrice, ReceivingPO, DATENAME(d,Cast(ReceivedDate as Datetime) as ReceivedMonth) as 'Day' -- Change d to whatever you need. From #VPTable as vp Where vp.ReceivingPO is not null[/CODE]

Member Avatar for jovillanuev
0
167
Member Avatar for dougancil

[CODE] SELECT moncallAdd.FirstListing, DATEADD(MINUTE, mOnCallAdd.StartOnCallTime, DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899')) AS OnCallStart, DATEADD(MINUTE, mOnCallAdd.duration, DATEADD(MINUTE, mOnCallAdd.StartOnCallTime, DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899'))) AS OnCallEnd, 'Added' As Activity FROM mdr.dbo.mOnCallAdd WHERE DATEADD(MINUTE, mOnCallAdd.StartOnCallTime, DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899')) < GETDATE() and DATEADD(MINUTE, mOnCallAdd.duration, DATEADD(MINUTE, mOnCallAdd.StartOnCallTime, DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899'))) > convert(char(10),GETDATE(),101) -- 101 is US format, as is your …

Member Avatar for adam_k
0
129
Member Avatar for coroll

I don't have an SQL available now to test it with text fields, but try to [CODE]select col1,col2,col3,col4,count(*) from table1 group by col1,col2,col3,col4 [/CODE] If you don't want the count(*) in your results, use it as a derived query as so: [CODE]select col1,col3,col3,col4 from (select col1,col2,col3,col4,count(*) as 'counter' from table1 …

Member Avatar for coroll
0
183
Member Avatar for anwaryp
Member Avatar for adam_k
-1
155
Member Avatar for kheijhei

I think GeekByChoice explained that we won't write the program for you here: [url]http://www.daniweb.com/software-development/vbnet/threads/379364[/url]

Member Avatar for adam_k
0
84

The End.