655 Posted Topics

Member Avatar for holly.z.fox

If you can't figure out what the error is, what makes you say it is wrong? Were you told it was wrong as part of an assignment? Is there some other instruction you aren't sharing with us? Please share your thoughts or reasoning, otherwise we don't know if you've put …

Member Avatar for BitBlt
0
70
Member Avatar for mahela

When the database is local on the user's computer, you can build the connection string to concatenate with the App.Path object property. When the database is on a shared network folder, you have to either a) make sure the same drive letter mapping is on every computer that's going to …

Member Avatar for AndreRet
0
464
Member Avatar for karthik82vk

Your request is a little unclear. Can you describe your data scenario a little more? Are you expecting entire rows to be blank scattered throughout the data, or entire columns to be blank in the middle? Or are you simply looking to lop off empty rows from the end, and …

Member Avatar for BitBlt
0
325
Member Avatar for Ancient Dragon

Maybe get some other old CD's, a coat-hanger and some thread and make a mobile or a wind-chime? :-Þ

Member Avatar for BigPaw
0
111
Member Avatar for iamthwee
Member Avatar for BitBlt
0
166
Member Avatar for forjustincase

Use the ADODB object library to establish a connection, create a recordset, execute the SQL statement you want and retrieve the records. There are some pretty good examples in the VB help file. Just search for "ADODB".

Member Avatar for AndreRet
0
3K
Member Avatar for Priti Talware

As near as I can tell, the problem is that the variable "index" defined at the module level is never set to an explicit value. You reference "index" on line 40 above, testing it for a value not equal zero. Fair enough, but it never gets set anywhere else to …

Member Avatar for BitBlt
0
154
Member Avatar for Stuugie

A little more detail is required. Where does the value in variable srcDate come from? How are the update values being supplied? What are you updating the column dbo.tblCPI.VariableValue to? Depending on the answers to those questions, a solution could vary wildly. One little pointer, though: you seem to be …

Member Avatar for Stuugie
0
202
Member Avatar for cheesy_ninja45

While we won't do your homework for you (we do ask that you make at least an attempt!) I can give you some hints: In a "For" loop, you can have a negative "step"...in a While loop, you can initialize your counter variable to something besides zero...same thing in your …

Member Avatar for BitBlt
0
216
Member Avatar for t0kipot

You could do it in several ways. One simple way is to just disable the button so it can't be clicked again. Another way is to set a value in the "Tag" property of the button, then check it every time and only allow adding if the Tag has no …

Member Avatar for AndreRet
0
139
Member Avatar for honeybee2090

That's fine, as long as you have explicit line breaks on every line in your text. If you have a multi-line text box without horizontal scroll (a.k.a. "Word Wrap"), it gets way more complicated. You have to use some Windows function calls to get the text metrics for your textbox, …

Member Avatar for honeybee2090
0
536
Member Avatar for showman13
Member Avatar for showman13
0
145
Member Avatar for ponnu

Try this: If IsNull(DLookup("[empid]", "[employee]", "[empid]= " & txtemplid.text)) Then This assumes, of course, that txtemplid.text is numeric, and that [empid] is numeric.

Member Avatar for ponnu
0
2K
Member Avatar for lianpiau

Your post is a little confusing. Let me paraphrase to see if I understand what you're after. 1. You have a table that includes two columns: OrderFormNo and CashBillNo. 2. You have a row in the table with values OrderFormNo=123 and CashBillNo='ABC'. 3. You want to make sure that every …

Member Avatar for debasisdas
0
225
Member Avatar for on93

I looked at your SQL statements and it all looks fine, as far as I can tell. I did have to translate your SQL to a dialect I was more familiar with, but once I got all that fixed up, I didn't have any problems building the database and populating …

Member Avatar for BitBlt
0
135
Member Avatar for myliene
Re: vba

So what have you tried already? Please post it. We will be happy to help with your code if you're stuck, but we don't just write programs on request.

Member Avatar for BitBlt
0
90
Member Avatar for angel06

There are so many questions about your code...where to start? Okay, so, in no particular order: What is the datatype of the HoursTotal field in Table1? If it's a datetime and you want to manipulate it in your VB code, then you'll probably want to look at some of the …

Member Avatar for BitBlt
0
123
Member Avatar for AmrMohammed

A couple of observations about your scenario, then a couple of questions. Observations: 1. There is nothing in the data to tell you the time when a shift starts or ends. That means you have to hard-code it somewhere, which makes it difficult to add shifts or change start/end times. …

Member Avatar for BitBlt
0
1K
Member Avatar for iamthwee

Up votes, down votes Smile votes, frown votes. Votes for good posts, votes for bad posts Even votes for some Geek's Lounge posts. Votes give good rep Votes give bad rep Good and bad and sad and glad rep Members vote posts as they should, Infraction points for "not so …

Member Avatar for Mike Askew
0
459
Member Avatar for angel06

Okay, so there are a couple of things going on here. 1. Your SQL statement as written will include ALL records. (If the Employee_ID = 2674930 then it doesn't equal 2267421, therefore is included...and vice versa.) You should have something like this: WHERE Employee_ID <> 2674930 AND Employee_ID <> 2267421 …

Member Avatar for BitBlt
0
237
Member Avatar for BitBlt

DaniWeb is great, and I really like the new incarnation. But there are some kinds of functionality that didn't get re-implemented. The specific one I would like to see brought back is that you could click on the "New" button next to a thread (or the purple "bulls-eye" for threads …

Member Avatar for BitBlt
2
224
Member Avatar for niladri.prima

You simply neglected to change the criteria on the two parts of the CASE clause. Look at this: SELECT source, unique_contact_code, bxl_amount_paid, Date_ABC_Updated, (Case WHEN Date_ABC_Updated IS not null and Subscribed_to_Business_XL = 'SUB' then 'Active' -- <------ Notice this! when Date_ABC_Updated IS not null and Subscribed_to_Business_XL IS null then 'Inactive' …

Member Avatar for BitBlt
0
112
Member Avatar for HibaPro

A 424 error indicates there is either a reference to an uninstantiated object variable, an attempt to perform an invalid operation on an object (such as assigning a value to a read-only property) or a missing DLL/component file. All this information can be found in the VB help file by …

Member Avatar for AndreRet
0
423
Member Avatar for cmstoner

This is kind of a shot in the dark, but I notice that the format of line 39 seems to be different from the formats of the subsequent 7 lines. Could it be that the error message is a symptom of THAT rather than a problem with the actual data …

Member Avatar for cmstoner
0
841
Member Avatar for kabir383

> I only made one mistake in my life, that was when I thought I was wrong, but I was wrong about that. So this is a case of "two wrongs make you write"? Ba dum bum...

Member Avatar for woooee
0
178
Member Avatar for joslup9

You can use the "EXEC" statement in your procedure to dynamically build the necessary statement. create procedure creadatabase @db_name varchar (10) as exec('create database ' + @db_name) go That being said, you might consider carefully before you allow just anybody to run this procedure. The possibility of people creating databases …

Member Avatar for BitBlt
0
176
Member Avatar for ss123456

I assume the code is erroring out on line 3? If so, you could always use one of the conversion functions like CDbl to convert rs.Fields(0) to a Double. You might also consider using the "val" function. The drawback is you might run into truncation issues. I'm not that familiar …

Member Avatar for AndreRet
0
2K
Member Avatar for niladri.prima

If you want to create a brand-new table from the results of your select, you can use this syntax: SELECT blah, blah, blah INTO dbo.myNewTable FROM dbo.IASubscription The drawback with this approach is that sometimes the datatypes you wind up with may not be the ones you would choose if …

Member Avatar for BitBlt
0
154
Member Avatar for yumyam09

Also, your SQL statement is probably not well-formed. You should be concatenating the literal with TWO SINGLE-quotes and a couple of concatenation symbols It should look like this (assuming MSSQL is your dbms): sql = "SELECT Position from tblLogin WHERE username = ''" & txtUsername.text & "''"

Member Avatar for Reverend Jim
0
110
Member Avatar for dinhunzvi

Actually, there is an object in SQL Server called a Check Constraint. You can use it to put all kinds of restrictions on columns. Here's what you would use: CREATE TABLE tblstudents ( studentID int identity(1, 1) NOT NULL primary key, lastName VARCHAR( 20 ) NOT NULL, initial CHAR( 1 …

Member Avatar for BitBlt
0
208
Member Avatar for jason.lopeman

You have to use the "memberOf" query segment (with the appropriate exclamation-point to indicate "NOT") in your filter statement. Here's a sample (names changed to protect the innocent): $Searcher.Filter = "(&(objectCategory=person)(objectClass=user)(!(memberOf=CN=Domain Admins,OU=High Security Access Groups,OU=Information Technology,DC=corp,DC=myDomainHere,DC=com)))" If you aren't that familiar with using LDAP queries, you should read up on …

Member Avatar for BitBlt
0
239
Member Avatar for G_Waddell

No, SQL Server doesn't care about line breaks. Line breaks are for readability only. However, having the string built in your app like this: mySQLString = "create procedure dbo.myProc" mySQLString = mySQLString + " @inParm varchar(10), @outParm varchar(10)" mySQLString = mySQLString + " AS" mySQLString = mySQLString + " begin..." …

Member Avatar for G_Waddell
0
337
Member Avatar for matiqueen

You might consider changing the parameter "pPassword" to IN (it's set as "OUT" right now).

Member Avatar for smantscheff
0
199
Member Avatar for honeybee2090

Depending on how you want your results, you could use this: Me.Text1.Text = Replace(Me.Text1.Text, "*", vbCrLf) This will change the string in-place, but you have to make sure your text box is Multi-Line. Otherwise, it will just display as your string punctuated with unprintable characters. If you wanted to break …

Member Avatar for AndreRet
0
273
Member Avatar for cempli.branom
Re: help

If you look at line 28, you should see that you're trying to open an already open recordset. You shouldn't need to do that. What is it you wanted to happen there? Refreshing something?

Member Avatar for AndreRet
0
181
Member Avatar for PM312

You can do it a couple of ways. If the tables all have the same columns and datatypes, you could do it with a UNION operator, like so: SELECT * from Tab1 where PRNO = 500 UNION ALL SELECT * from Tab2 where PRNO = 500 UNION ALL SELECT * …

Member Avatar for PM312
0
165
Member Avatar for opspl_programme

Your request makes no sense. If you wanted to select for distinct EVA_ID you'd just write "select distinct EVA_ID from myTable" and be done with it. TrayID wouldn't even come into the mix, and any duplicates get collapsed into a single line. There seems to be a bit more constraining …

Member Avatar for opspl_programme
0
465
Member Avatar for ssreevidya.m

Your explanation seems to make no sense. Do you have 2 tables or 3? It looks like 3: tbl_Class: class_id (pk), class_name tbl_Divisions: division_id (pk), division_name tbl_class_division: class_division_id (pk), class_id (fk), division_id (fk) Next, you don't say whether the number of classes you pass is dynamic or not. If it's …

Member Avatar for BitBlt
0
162
Member Avatar for sphe_g

Well, you have several things going on here, but I have questions as well. First things first. Does your database have a FileStream filegroup added to it? If you look at the DatabaseProperties, under the Filegroups page, you should see it in the bottom list of filegroups. The top set …

Member Avatar for BitBlt
0
479
Member Avatar for dyanmorry
Re: exit

Not sure quite what you're asking. If you mean. "I want to click a button, show a message box and unload my form depending on what the user's response is", then you would just use the MsgBox function to get a return value, then decide what to do from there. …

Member Avatar for BitBlt
0
282
Member Avatar for Bile

One other little item. If you wanted to use "LIKE" to apply your selection criteria, you'd need to use a wildcard character such as an asterisk for MSAccess or a percent-sign for SQL Server to properly get all the User_Names which contain the text from the text-box. So, for example, …

Member Avatar for Bile
0
1K
Member Avatar for indrajeet6

Please notice that you are calling your function on line 20: AddUserFun(Acc_Lvl, user, passwd) and your function declaration is: Function AddUserFun(ByRef user, ByRef pass, ByRef acclvl) As Integer Notice that the order of the parameters is different. Fix that, and I think you'll be fine. Good luck!

Member Avatar for BitBlt
0
1K
Member Avatar for WolfShield

If you smoke while programming, that means you're typing too fast. <rimshot, please>

Member Avatar for BitBlt
0
250
Member Avatar for PhilEaton

Not familiar with that dbms. I know you said you can't use functions, (even string functions? Yikes!), but have you considered just unloading your data into a flat file, making your changes there (programmatically?), then reloading your data? I don't know how realistic that is, as in data volume, but …

Member Avatar for iamthwee
0
177
Member Avatar for nickg21

You might also consider left-joining to transfer. It tends to perform better: SELECT count(*) from Inquiry Inner Join Inquirer on Inquirer.ID = Inquiry.InquirerID_fk left join Transfer on Inquiry.ID = Transfer.TransferInquiryId_fk WHERE Inquirer.Program = 'value' AND TransferInquiryID_fk IS NULL Generally speaking, your query has to resolve the sub-select for each row …

Member Avatar for BitBlt
0
739
Member Avatar for Bile

You need to supply more information. Such as: What is the actual subroutine/function declaration? What is the actual statement that gets the error? What are the actual control names? What are the actual column names ("Date_Registered" <> "Date_Registred" <> "Date_Regitered")? You can't seriously expect help if you don't supply real …

Member Avatar for Bile
0
139
Member Avatar for akuvidz

Your request is a little...confusing. And, you didn't post the statement you are actually using. It's kind of hard to help when you don't include it. However (and I'm going out on a limb here) it sounds like your update statement isn't using a "where" clause to isolate the one …

Member Avatar for BitBlt
0
169
Member Avatar for rony001

Seems like you're mixing and matching your questions here. Notwithstanding the code syntax error (can we assume since you're using "DIM" then it's VB?) and the unwise use of reserved words ("table" and "name"), you aren't separating your statements with either a statement terminator (such as ";" or a "GO" …

Member Avatar for BitBlt
0
137
Member Avatar for GrimJack
Member Avatar for johncornelius23

There are several very good sections about it in the Help file. If you just want to use an ActiveX control, go to the Project/Components menu item, and select "Microsoft ADO Data Control 6.0 (OLEDB)". Plop one onto your form and set the properties. If you want more control over …

Member Avatar for Justinvzepeda
0
223

The End.