713 Posted Topics

Member Avatar for khizer03

What's to stop the user from just closing the window? or clicking start or using a keyboard shortcut for windows explorer or run? If you are interested in disabling all the above then you are not talking about a form, but a different shell. If I judge by this thread: …

Member Avatar for adam_k
1
138
Member Avatar for fatzky_04

urtrivedi is correct - at least up to the point of automatically joining the tables. Access lists objects in a particular order: Table, Query, Form, Report, Macro, Module. This is the same order you've got to follow when creating a new db. Start with the data you want to store. …

Member Avatar for adam_k
0
177
Member Avatar for jtodd

[QUOTE=jtodd;1701456]Thank Plasma! I tried the code below and when I try to run it the datagrid is still blank. Any thoughts? Am I doing something wrong? Thanks again for your help! [CODE] Imports System.Data.OleDb Public Class Form1 Private Sub DataGridView1_Click(sender As Object, e As System.EventArgs) Handles DataGridView1.Click Dim ds As …

Member Avatar for jtodd
0
3K
Member Avatar for phoenix_2000

put single quotes (') around 0097 and you'll be fine. By using 0097 like this you are not handling it as a string, but as a number - so the 0s don't belong there and get truncated

Member Avatar for phoenix_2000
0
136
Member Avatar for Aviplo

Read here: [url]http://msdn.microsoft.com/en-us/library/system.math.ceiling(v=vs.71).aspx[/url]

Member Avatar for adam_k
0
223
Member Avatar for skran

If you are expecting only 1 value and you are not really binding -let's face it you are just trying to assign a value - why are you using a datatable? Wouldn't it be easier to use an ExecuteScalar and get the value you are looking to assign to the …

Member Avatar for adam_k
0
1K
Member Avatar for Ruchi224

What is the type of cells(0)? Would it have a true/false as value ? Have you tried to step through the program and determine what is wrong with your code?

Member Avatar for Ruchi224
0
122
Member Avatar for divyakrishnan

1st of all this thread is 5 months old. I hope OP found the solution already - if not try with the group by as everybody suggested. Back to your solution: How would a view resolve an issue with a select statement? A view is used to a)simplify a complicated …

Member Avatar for adam_k
0
1K
Member Avatar for GTTravis

You can assign each datagrid to a different bindingcontext. [QUOTE] If you want to have multiple BindingManagerBase instances for the same data source, create a new BindingContext and set it to the BindingContext property of an object that inherits from the Control class. For example, if you have two BindingManagerBase …

Member Avatar for GTTravis
0
1K
Member Avatar for GTTravis

I'd use the OUTPUT clause with an update. You can find more information here: [url]http://msdn.microsoft.com/en-us/library/ms177564.aspx[/url] I'd suggest you read the whole page, as there are a few drawbacks, ie: [QUOTE]An UPDATE, INSERT, or DELETE statement that has an OUTPUT clause will return rows to the client even if the statement …

Member Avatar for adam_k
0
113
Member Avatar for vammy

The noob way is to create the textbox, with visible=False and change visibility on button click. If that won't do for you, read here : [url]http://www.daniweb.com/software-development/vbnet/threads/318076[/url] or here: [url]http://www.daniweb.com/software-development/vbnet/threads/101111[/url]

Member Avatar for vammy
0
231
Member Avatar for greatcornholio

How are you going to use this insert? Is it going to be part of a program that will insert a record or part of a procedure/query or whatever that will update all/some records from the costs table? The reason for asking is that if this is a program then …

Member Avatar for greatcornholio
0
202
Member Avatar for spowel4

This doesn't change what you've got to put in the stored procedure. It just might affect the way you handle it from your program. Make the changes that BitBit indicated and if you have a problem with your program open a thread in the appropriate section of the forum.

Member Avatar for adam_k
0
1K
Member Avatar for Paul Norris

If the only difference between the builds is the connection string, why don't you build a form that would allow you to change the connection string in the compiled apps? It doesn't have to be anything fancy, just which one is the "active" one. I'd expect this to be in …

Member Avatar for adam_k
0
252
Member Avatar for pawan768

[QUOTE=urtrivedi;1694729]you need to create after insert trigger on employee table, in which you should write update statement for department table update department set no_of_employees =no_of _employees+1 where dept_id=new.dept_id then you create delete trigger update department set no_of_employees =no_of _employees-1 where dept_id=old.dept_id then you create update trigger update department set no_of_employees …

Member Avatar for adam_k
0
148
Member Avatar for ssreevidya.m

The function you need is month(). [CODE]select * from Student_transport_Details where month(StartDate) = 1 or month(StartDate) between 6 and 10 or month(StartDate) in (2,4)[/CODE]

Member Avatar for red_ruewei
0
5K
Member Avatar for aneeka

@pritaeas this will sort the records descending, but won't select only the latest date. Edit: It won't do even that as you are grouping by item_code and then sorting by item_code and then by date. This will select only the latest date [CODE]select * from table inner join (select max(date) …

Member Avatar for BitBlt
0
121
Member Avatar for violette

I believe that you've messed up your IFs. You've got 2 [ICODE]IF recordExistCom = False Then[/ICODE] and the second of them ends just before the loop. The Else you've got between insert and update will only work for the inner if, and you'll never update. PS: It would make it …

Member Avatar for violette
0
165
Member Avatar for akshaya kochare

You don't need to validate, but to limit the datepicker. Read here: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.mindate.aspx[/url]

Member Avatar for bluehangook629
0
79
Member Avatar for Mike Bishop

try adding a space before the where and after the double quotes. If this doesn't work get a glimpse of your update by using debug.print and copy/paste it here. PS: Why are you using VBCrLf in the update?

Member Avatar for Mike Bishop
0
203
Member Avatar for anwar.mustafa

I may be wrong, but SelectedRows won't do it for you. SelectedRows is used for rows selected (ie clicked on or multi-selected with Shift or Control pressed while clicking) and not for rows that have been "selected" with a checkbox. I believe you need to change SelectedRows to Rows and …

Member Avatar for adam_k
0
308
Member Avatar for weeraa
Member Avatar for adam_k
0
128
Member Avatar for xtanmanx

I'm not sure why you have to write the data in a CSV and then load a second app. If both apps are going to be yours, then why not create a second form and have it read public vars? Have form1 start your 3rd party app and then your …

Member Avatar for rthrtshrfhsrh
0
1K
Member Avatar for noobies

That condition is easily achieved if you add NULL or '' for the missing columns in the query with the fewer columns

Member Avatar for adam_k
0
110
Member Avatar for BWS9292
Member Avatar for adam_k
0
92
Member Avatar for Arjun_Sarankulu

Let me know if this will do the trick for you. [CODE]select a.Roll_id, b.Roll_id from (select Roll_id, ROW_NUMBER() over (ORDER BY Roll_id) as 'RowNumber' from test2 ) a inner join (select Roll_id, ROW_NUMBER() over (ORDER BY Roll_id DESC) as 'RowNumber' from test2 ) b on a.RowNumber = b.RowNumber[/CODE]

Member Avatar for adam_k
0
89
Member Avatar for violette

Just for future reference, your error was here: [CODE] "'," & netInvest & "'," & netInvest & "'," & netInvest & "','" &[/CODE] you are missing single quotes. It will be a lot easier for you to troubleshoot errors of this type by using debug.print sqlStr (or how you call …

Member Avatar for WaltP
0
598
Member Avatar for wezel
Member Avatar for kurohige

If I remember correctly you can't restart an Access db as the code that is called to do the start part has stopped existing when then db has closed. I used to use a second db with vba that would open a new instance of the db after x secs …

Member Avatar for kurohige
0
941
Member Avatar for ssreevidya.m
Member Avatar for urtrivedi
0
208
Member Avatar for violette

Use the ROW_COUNT() function. Read here: [url]http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_row-count[/url] for more info.

Member Avatar for bluehangook629
0
306
Member Avatar for bilal_fazlani

This is the way to go: [CODE]update customers set customers.acc_balance = a.inv_sum from customers left join (select cust_id, sum(inv_amount) as 'inv_sum' from invoices group by cust_id) 'a' on customers.cust_id = a.cust_id[/CODE]

Member Avatar for bilal_fazlani
0
264
Member Avatar for vjwilson

In my book either all info regarding an event that could change (type of fuel sounds like this) have to get saved with the event itself (ie tank containing jet emptied). If the size of these info along with the number of records repeating them is high, then you might …

Member Avatar for BitBlt
0
243
Member Avatar for shers
Member Avatar for JOSheaIV

If I understood correctly you've installed SQL on your local computer and created an instance named MYSQLTESTSERVER1. If this is true then you need to enter localhost\MYSQLTESTSERVER1 as the server name. PS: If you actually renamed your computername to MYSQLTESTSERVER1 then you try localhost or MYSQLTESTSERVER1.

Member Avatar for JOSheaIV
0
179
Member Avatar for kurohige

[CODE]SELECT DateDiff("n",Now(),[TimeStamp]) AS [Time] FROM RIMData_RAW where DateDiff("n",Now(),[TimeStamp]) > 30[/CODE]

Member Avatar for adam_k
0
84
Member Avatar for Scaffa

I am on the other side of the fence. Soon we won't be using keyboards and commands won't be but buttons, drop down menus and stuff like that. Let's not forget that no matter how powerful or not DOS was it's the GUI that made computers popular and easy to …

Member Avatar for sloan31
0
308
Member Avatar for Unbreach

Contract or no contract I can think of at least 2-3 ways to get away with a big compensation. My advice would be to put into the contract that if you don't get paid within x days you've got the right to bill their credit card. Of course you should …

Member Avatar for adam_k
0
191
Member Avatar for VIPER5646

A good step in debugging something like this is to get the actual statement and either run it in the db or at least go through it. use [ICODE]debug.print cmd.commandtext [/ICODE]just before the ExecuteNonQuery and verify that you are running what you think you are.

Member Avatar for VIPER5646
0
146
Member Avatar for dewaal99

The criteria are being passed to your report as strWhere. Copy this part of code: [CODE] If IsDate(Me.txtEndDate) Then If strWhere <> vbNullString Then strWhere = strWhere & " AND " End If strWhere = strWhere & "(" & strDateField & " < " & Format(Me.txtEndDate + 1, strcJetDate) & …

Member Avatar for adam_k
0
159
Member Avatar for ibpet11

Relate is a bit too generic for me. Can you please describe what you are trying to accomplish? Do you need a foreign key or a join ?

Member Avatar for sneha_07
0
152
Member Avatar for beautechful

Do you want this to validate a user in your app or in Windows? I'm guessing your app, so I'm guessing that you could save an encrypted file in the flash drive and after decrypting it and reading it determine if this is a) a valid file b) a valid …

Member Avatar for adam_k
0
68
Member Avatar for jacksantho

I am not sure what you mean by automatically, so I'm leaving this part out for now. To change the values between the 2 dates from no to yes you need an update query. It should look like: [CODE]update table set status ='yes' where status = 'no' and date between …

Member Avatar for jacksantho
0
1K
Member Avatar for AndyPants

It looks like you already know about [CODE] Dim cb As New OleDbCommandBuilder(da) da.Update(dt)[/CODE] What seems to be the problem?

Member Avatar for AndyPants
0
181
Member Avatar for Ehtesham Siddiq

I'd insert the sheet into a temp table (or a var table for speed) and have SQL pick what it needs with a [ICODE]not in[/ICODE]where clause or an outer join with null values for the table side key columns. This will give you the possibility to verify multiple keys simultaneously …

Member Avatar for adam_k
0
288
Member Avatar for don420

You lost me with the I want to add the values in the column the row. Your code seems only to be adding the second from last row in datagridview, and then you try to add to total the value of row -1 (your counter is 0 and you subtract …

Member Avatar for adam_k
0
6K
Member Avatar for aishapot

For troubleshooting purposes add [ICODE]debug.print strsql [/ICODE] before or after [ICODE]sqlcmd.ExecuteNonQuery()[/ICODE]. This will return (in the output window while debugging) the exact statement you are passing to SQL server, with values and everything. If it looks correct, copy/paste it on your SQL and verify that you get the intended result.

Member Avatar for aishapot
0
211
Member Avatar for juniorsilver

I agree with hericles, you have to handle the situation where something goes wrong with the insert. What is your database? If it supports stored procedures, I'd create one, feed the user name and the vote and have it handle the vote. This way even if the connection from the …

Member Avatar for adam_k
0
143
Member Avatar for Alok1019

First of all, you can't possibly lock an administrator out of a folder. To get your data back open window's explorer and navigate to the folder. Right click and select properties, switch to Security tab and click advanced. You can try to change permissions, but chances are you won't have …

Member Avatar for adam_k
0
107
Member Avatar for imobby

A database can hold and serve you data no matter where you connect from. Point both applications to the save server and you'll be just fine. No offence, but I read you're going to build a website and in contrast with your question I can't help but think that if …

Member Avatar for adam_k
0
164

The End.