713 Posted Topics

Member Avatar for prajot_03

Row(i) can be used in a loop, so I don't think that has to be the problem. Can you debug.print or just messagebox cm1.CommandText and let us know the actual statement you try to execute. Also the actual error might help.

Member Avatar for thines01
0
153
Member Avatar for tariqi2011

You need to join to the Employee table twice (one for each name you want returned). Select a.FirstName + ' ' + a.SecondName as 'Technician', b.FirstName + ' ' + b.SecondName as 'Dispatcher' from Dispatch inner join Employee a on TechnicianID = a.EmployeeID inner join Employee b on DispatchID = …

Member Avatar for tariqi2011
0
206
Member Avatar for Traps

Use a different computer on the same network to connect to your SQL server either via code or SQL Management studio or just a DSN and test connection (or supply username/password and try to set a db as default for that DSN). I've got the feeling that your friend's SQL …

Member Avatar for Traps
0
277
Member Avatar for sing1006

Let's start by saying that your code will never get you logged in and it's not just the connection string. 1) You are comparing the queries you use to verify the username/password with the actual password: if Select Uname From Account WHERE UName = sing1006 can never return true (Except …

Member Avatar for adam_k
0
143
Member Avatar for dinhunzvi

I'm not sure I get the question. You can create accounts from your control panels "Users accounts" or if you are using AD you have to create them there. After the users have been created you set the services to run under the user you've created. If this didn't answer …

Member Avatar for adam_k
0
68
Member Avatar for SolTec

You are leaving too much to imagine. Where are your data stored and what do you mean numbered 1 through 10000? When talking about report in VB or C# Crystal reports come in mind, do you have that in mind or are we talking about something different?

Member Avatar for adam_k
0
87
Member Avatar for kram54

I doubt that utrivedi's update will work since update should be followed by the table to be updated only. like this: update [rotadb].[dbo].[Rota] set [rotadb].[dbo].[Rota].[ldchangetime] = [dentime].[dbo].[den].[time] from [rotadb].[dbo].[Rota],[rotadb].[dbo].[RotaBos], [rotadb].[dbo].[RotaBa],[dentime].[dbo].[den] where [rotadb].[dbo].[Rota].[pRotaBos] = [rotadb].[dbo].[RotaBos].[Rotabos_rowid] and [rotadb].[dbo].[RotaBos].[pRotaBa]=[rotadb].[dbo].[RotaBa].[RotaBa_rowid] and [rotadb].[dbo].[RotaBa].[skod]= [dentime].[dbo].[den].[skod] But since I feel much more comfortable with the join syntax: …

Member Avatar for kram54
0
123
Member Avatar for kindofsudden

The comboboxes don't matter, it's the code that handles them. Check the code that handles the events on the comboboxes (either focus and lost focus or value changes) and the datagridview. I'm betting that you've got a logical error in your design or you are reading from your db instead …

Member Avatar for kindofsudden
0
287
Member Avatar for jugnu

You can either use a uniqueidentifier to make sure that you don't have duplicate IDs in your tables or add the location in the id (01001A and 01001B).

Member Avatar for adam_k
0
136
Member Avatar for paoi00

On your last question: You can't use collations with MS Access as far as I know. I'd suggest you change the way you approach the whole thing and use a datatable to hold your usernames. Using a datatable offers you solution to both your problems for the price of one. …

Member Avatar for paoi00
0
499
Member Avatar for paoi00

Please note that Mitja Bonca's way of performing the check assumes that the selection limit is per user/session. If the user restarts your program then the number of times each entry is selected will be reset to 0. Also 60 is the limit per user, so for 10 users they …

Member Avatar for paoi00
0
318
Member Avatar for newbie12345

You can: * Create a global variable that will hold your username and use it whenever you need it. In your case you'd query the db for info for that username. * You can get all the info you want in the login sub and pass it to the second …

Member Avatar for smitty68503
0
5K
Member Avatar for jhedonghae

I preffer to use session IDs for audit trails. It will ensure that you are logging out the correct session, and allows you to log users activities with only 1 unique ID that can point to a number of info that you wouldn't be logging otherwise. Usually this means to …

Member Avatar for jhedonghae
0
1K
Member Avatar for kampao00
Member Avatar for jhedonghae

I am assuming we are talking about the event in Button5: Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If ComboBox1.Text = "First Year" Then If ComboBox1.Text = "" Or ComboBox3.Text = "" Or TextBox9.Text = "" Or TextBox1.Text = "" Or TextBox2.Text = "" _ …

Member Avatar for jhedonghae
0
366
Member Avatar for darthswift00

You should use a Try...Catch statement on your `sqldLoginadapter.Fill(DatasetLogin1, "empdetails")`. Read here for more info in try and catch: http://msdn.microsoft.com/en-us/library/fk6t46tz

Member Avatar for darthswift00
0
176
Member Avatar for darthswift00

Can I ask what each form is supposed to do? Especially interested in the second form. Anyway, depending on the way you call the second form it might be easier to just pass these 2 values in the second form as parameters. ITG-JM and Reverend Jim are right to also …

Member Avatar for Reverend Jim
0
3K
Member Avatar for jhedonghae

When this code executes is your login form open? I'm guessing that you are populating the LevelofAccessTextBox after verifying login details. Wouldn't it be easier to use a global var and be done with it?

Member Avatar for jhedonghae
0
157
Member Avatar for Gobble45

I haven't tried this in VB, but in VBA you can directly `Range("A1").End(xlDown).Select ` I'm guessing you could use it as `xlworksheet.Range("A1").End(xlDown).Select`

Member Avatar for Reverend Jim
0
967
Member Avatar for samsnov

You will need a table with movie title, url, url for picture, optional a short description (or IMDB link) and probably a status. You can query this table by either movie title, or url used for the picture or any of the other fields.

Member Avatar for ChrisPadgham
0
286
Member Avatar for tendaimare

Why don't you try RSS: http://developer.yahoo.com/weather/ or http://www.weather.com/weather/rss/subscription/ instead of website?

Member Avatar for adam_k
0
163
Member Avatar for cheiL

I believe you are missing a space before AND in [CODE]"AND dtm = CONVERT(DATETIME,'" + cstr(Year(dtmStart)) + "-" + cstr(Month(dtmStart)) + "-" [/CODE] Same for [CODE]"AND (strRoomType='" & strRooms(0) & "'"[/CODE] Change them to have a space like " AND..." and then give it a try. If you still get …

Member Avatar for cheiL
0
137
Member Avatar for poojavb

Store everything in that bill into tables (header and detail or more if it is required) and have your CR read the table with bill number or something as parameter. Then you can use the same CR for both occasions.

Member Avatar for poojavb
0
100
Member Avatar for zo0oda

according to your description you want strSQL = "insert into ReceiveOrder (TableNo, FoodName,Quantity,Price) select TableNo,FoodName, Quantity , Price FROM StoreOrders4 WHERE TableNo = 4" and then you need a second command that will remove the records from StoreOrders4 like this strSQL = "delete FROM StoreOrders4 WHERE TableNo = 4" Suggest …

Member Avatar for adam_k
0
1K
Member Avatar for darthswift00

This seems a popular topic today. Read here how to use Try...Catch : http://msdn.microsoft.com/en-us/library/fk6t46tz

Member Avatar for adam_k
0
89
Member Avatar for Zhakes

I'd like to have more info on the tables involved (how these 2 join to each other and how they join to the tickets table). It would also be nice to give us a brief explanation on what each field means to you (don't assume we all understand the same …

Member Avatar for adam_k
0
75
Member Avatar for ma.ali786

The short answer is you can't. Oracle has nested tables, but MS SQL server doesn't. If you describe why you want this / what are you trying to achieve perhaps we can find you with an alternative (like 6 columns in your employee table that you concatenate in a view …

Member Avatar for adam_k
0
242
Member Avatar for donjt81

Give this a try update productmine set a.statusid = b.statusid from productmine a inner join productSC sc on a.code = sc.coe inner join status b on sc.status = b.status

Member Avatar for donjt81
0
122
Member Avatar for er_svijayakumar

For me the best option would be to save it as inches. With the use of 2 functions you'll never know that you are saving in inches and you'll be able to make calculations and comparisons (is this longer than that or whatever). What you'll need is a function that …

Member Avatar for adam_k
0
136
Member Avatar for shanboy

darkagn is correct. You need to group by all the fields that don't aggregate. You might want to take into account the number of fields you are selecting (and grouping by) together with the sum. In your statement (with the correct group by) you'll get the sum [B]per order[/B] per …

Member Avatar for shanboy
0
413
Member Avatar for saleem.mukhtiar

Since your check in date is actually a date+time you can't just go ahead and say [iCODE]check_in = '3/11/2012' [/iCODE] because this translates to '3/11/2012 00:00:000' You should make sure that either your filter gets into account only the date part or filter for check_in between '3/11/2012' and '3/12/2012' Please …

Member Avatar for adam_k
0
98
Member Avatar for reds8
Member Avatar for jacksantho

What file sizes/number of records are we talking about? The way I see it you can either use a macro with OLEDB and insert the records from excel or create an access db with linked tables (1 for your file and 1 for the sql server) and an insert query.

Member Avatar for adam_k
0
693
Member Avatar for mmazeemahmad

So would Accdepartment be the next column ? And where would the female ones be shown? Does this look right: totalEmployees --------- gender -------- AccGender --------- Department ---------Accdepartment --------7 --------- male ---------- 8 ----------IT Dept --------- 5 --------7 --------- female ---------- 10 ---------- IT Dept --------- 3 --------7 --------- male …

Member Avatar for adam_k
0
293
Member Avatar for jacksantho

I don't have an SQL 2008 to test, but I'm guessing that your query fails for a number of reasons. The 1st one is that you are assigning values to variables inside the nested query. The 2nd one would be that distinct and row_number don't mix very well as row_number …

Member Avatar for jacksantho
0
218
Member Avatar for dilse4sk

What are you using to hold your data? It's almost always the case that dbs offer results like this a lot faster than windows (or web or console) programs will with sequential processing. By report, are we talking about Crystal reports or you need a form with 2 textboxes for …

Member Avatar for M.Waqas Aslam
0
228
Member Avatar for Denden17

I'd add the number of days to the last payment and check if it's greater than today's date. (or subtract number of days from todays date and check with last payment date) PS: I've never heard of somebody getting paid every 15 working days. I've heard of every other Friday …

Member Avatar for Begginnerdev
0
145
Member Avatar for arbazpathan

What are you trying to do with this? How much volume/read-writes? You can create a trigger that will verify that your vendor_name exists in the vendor table, but that will slow down your table and in a high traffic environment it can be a problem. If the purchase_order get's handled …

Member Avatar for adam_k
0
175
Member Avatar for zeroflee09

Reverend is correct. Your design needs some changes. If you need to search by name in any of the tables that don't have a name then join to the table that has it and you'll be able to. What happens if you need to search a patient with their social …

Member Avatar for adam_k
0
138
Member Avatar for Denden17

Can you share what you've tried for enabling and disabling the account? Also, if this is a school assignment it's OK, but if you are really using this then I have to disagree with your logic for validating the username and password. What you are doing is you are retrieving …

Member Avatar for Denden17
0
2K
Member Avatar for arsheena.alam

Like BitBlt said it can be a number of things and you need to provide info. For all we know you could be retrieving 25 rows of 12 fields of 2GB each. Or it could be a deadlock or .... Addtionally to BitBlt questions: Are you connecting the same way …

Member Avatar for dickersonka
0
150
Member Avatar for tendaimare

There isn't a safe way to keep a program running not stop. The program designed like this is explorer.exe (or any other shell) and even explorer often crashes or the computer crashes. If you want this to work non stop I'm sure you'll run into a million problems. I advise …

Member Avatar for Gé48
0
283
Member Avatar for jjones3580
Member Avatar for AndyOwl
0
154
Member Avatar for Leodumbi

I may be wrong, but your problems (2) lie with linha When you are creating the datatable you are declaring linha, which gives it a scope within the sub. You are getting the error because you are trying to use linha outside of the sub that it belongs/exists. I may …

Member Avatar for Mitja Bonca
0
124
Member Avatar for f_atencia

Read here: [url]http://msdn.microsoft.com/en-us/library/ms187518.aspx[/url] You should focus on full outer join and before inserting, you should try with just selecting them. You might need to filter the results prior to your insert.

Member Avatar for BitBlt
0
131
Member Avatar for rockout15
Member Avatar for dilse4sk

Change [CODE]Dim lrd As SqlDataReader = cmd.ExecuteReader() RegisterCustomer.txtEmpIDReg.Text = Convert.ToString(lrd("Emp_id"))[/CODE] to this [CODE]dim emp as string = "" emp = cmd.ExecuteScalar RegisterCustomer.txtEmpIDReg.text = emp[/CODE]

Member Avatar for dilse4sk
0
141
Member Avatar for poojavb

You can connect exclusively to an Access db (I assume from the .mdb that this is access prior to 2007) by using this connection string: [CODE]Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Mode=Share Exclusive;User Id=admin;Password=;[/CODE] as specified by [url]www.connectionstrings.com[/url] (look up connection string for access 2007 if that's the correct version here). If you try to …

Member Avatar for poojavb
0
190
Member Avatar for solomon_13000

You can easily do it with dynamic SQL. This means that you will write your query on the fly, depending on the parameters or conditions you find along the way. In your case I think this would mean: [CODE]declare @query varchar(max), @criteria varchar(max) set @query= 'select * from rm_exchange ' …

Member Avatar for solomon_13000
0
109
Member Avatar for ndodi
Member Avatar for ndodi
0
230

The End.