|
Several of my forms contain Adodcs, whose recordsource is a SQL statement containing a variable name. the Adodc (and bound datagrid) work fine for all, but whenever i load or unload the project i always get the following msg:
"ADODC: No Recordsource specified, ADO: cmd text was not set for command object"
Is there anything i can do about this? Thank you in advance!
|
|
|
|
|
in my datagrid i have allowed for updates. the datagrid is bound to an adodc, whose datasource is a SQL statement (ie not a table in the access database). the datagrid contains 3 columns - 2 from the products table in the database and 1 from a related price table. how do i reference these 3 fields (for an insert SQL statement) when adding and saving a new record (row) in the datagrid? if you need any additional information, please let me know! any help would be greatly appreciated!
|
|
|
|
|
Hi, My name is Rachel. I'm looking for a simple grid, no bound to database.
I need the ability to define simply:
1. The number of columns and rows.
2. The height of rows and width of columns.
3. To control easily on the selected cells.
3.1. I need to the ability to select some cells that are located far from one another.
Thanks Rachel
|
|
|
|
|
Might I suggest using the vsFlexGrid .
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Thanks for the suggestion. I know this one very well from previose versions of VB but where do I found it in the .NET version
|
|
|
|
|
That's strange, I'm using .net and I'm also using the flexgrid. hmmmm ...... could you use the grid in vb6 ?
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
O.K I found it. It is now as VideoSoft FlexArray and not as FlexGrid.
But now there is a new problem. It is not share componenet thay want me to buy it, almost 300$ for this. I remeber that the flexgrid was free one.
Also to your ask befor. I do not have VS6 on my computers. I used it in previos works I had. On my current computers I installed the VS.NET from the start.
Thanks Very Much
|
|
|
|
|
Actually, the flexgrid in VB6 was not free. You could use it but it kept popping up messages asking you to buy it. I guess .net just tightened the rules and made it so that you have to buy it before you can use it..
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
the columns in my datagrid are Code, Company, Address (based on a table in the database). the datagrid is bound to a SQL statement. is it possible that when i either:
(1)highlight a record, and press a command button and text boxes in another form will be populated relating to each of these columns (ie in the second form, i would have textboxes for Code, Company and Address)
(2)double-click on a record (ie row) and the textboxes will be populated?
i am very unsure of how to reference rows and columns and cells in datagrids so this is why i am asking this question.
Any help would be much appreciated!
|
|
|
|
|
I got .NET Enterprise Architect Edition installed in my machine.
Every time I try load a new project the application closes down without giving any error message but that project is somehow saved in the project list. Then when I re-start the .NET and open one of the saved projects and try to add a new windows form, again the application closes down.
I tried repairing the .NET but same thing kept on happening.
I tried re installing .NET but same thing kept happening.
I didn't try reinstalling the OS and then installing .NET.
I installed the service pack 2 for .NEt as LeeDavies Suggested.
Still .Net crashes when I load a windows form.
I'm having a Intel P4 with 256 Ram running Windows 2000 professional edition.
Why is this problem pertaining?
kind rgds
Anjana Aluthwala
---------------------------
P.S.
Thanks LeeDaviesVBSource for your suggestions.
|
|
|
|
|
|
i am trying to populate a datacombo box based on what has been chosen from another using the following code:
Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
Dim strProductType As String
strProductType = DataComboType.Text
Dim descSQL As String
descSQL = "SELECT Product.Description FROM ProductType INNER JOIN Product ON ProductType.TypeCode = Product.TypeCode WHERE ProductType.Description= '" & strProductType & "'"
Set RS = Conn.Execute(descSQL)
Do While Not RS.EOF
DataComboProduct.DataField = RS.Fields("Description")
RS.MoveNext
Loop
However, the second combo box does not populate at all - why is this? Thank you!
|
|
|
|
|
Hi
I assume that "DataComboProduct" is the name of your second combobox, and that you are sure that you recieve records to your recordset.
I have not used the "DataField" method so I don't know how it works.
My suggestion is:
DataComboProduct.AddItem RS.Fields("Description")
Good luck
//Keder
|
|
|
|
|
Thank you so much for your help - i tried the AddItem method (which does make sense) but it returned the error "Method or data item not found"....is there anything else i could try??!!
|
|
|
|
|
I'm not sure but I think the error message says that it couldn't find RS.Fields("Description"). When you write your select statement you use Product.Description, maybe that have something to do with it.
Try this, not so nice, but it works
RS.Fields(0) 'Description
If you had recieved more info you should write
RS.Fields(1) 'Name
RS.Fields(2) 'Street
//Keder
|
|
|
|
|
Hello
Can someone explaine,simple, how I should work with IShellPropSheetExt, IShellExtInit. I have a reference to a .tlb file that contents IShellPropSheetExt and IShellExtInit.
I'm trying to add a tab in "Active Directory Users And Computer". All info I have found is for C++ but I'm using VB6.
//Keder
|
|
|
|
|
If I try to insert the ms flexgrid (and other ms activeX) in visual studio .NET i promts that I dont have a run time licence. I have the professional edition, and I can insert it in Visual Studio 6. Somebody know how to fix this problem?
|
|
|
|
|
we want to move to n-tier using .NET.
Our Current Env:-NT/SQLServer/VB6 -ClientServer App
Planend New Env:-NT/Oracle/VB.NET or C#
here is what we are planning :-
vb client->.net components (developed in VB.NET/C#) ->Oracle
if somebody can advice on the following..
1.Should we host the components in COM+ as it gives advantages like object pooling and dbconnection pooling, but at the same time is it really beneficial?
Are the advantages really worth?
Our thin client downloads lot of data upfront and then it becomes very user intensive app.
2.what should be the medium to communicate from client to components?
a.remoting with http/tcp
b.can we try to use webservices.
thanks in advance
|
|
|
|
|
Did this easily in VC++, now I'm trying to learn VBasic 6.0...
ClassA
ClassB - includes pointer to an ordered list of ClassA's
ClassC - inherits from ClassB, includes pointer to one ordered list of both
ClassA's and ClassB's
All classes created and destroyed dynamically, multiple instances
On form:
Custom ListBoxA - with pointer to list of ClassA's whose member variable
"name" determines items in ListBox
Custom ListboxB - same as above, but ClassB's
Custom ListBoxC - same, but both ClassA and ClassB as items
the problem:
Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??)
VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types.
Is this the kind of thing I would use a Collection class for?
One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this??
Thank you to anyone who has read this far and who responds.
Tym!
|
|
|
|
|
bad news man, VB6 doesn't support pointers as far as I know. I have read an article somewhere in CP that uses API to get pointers in VB6 but I can't seem to find it again.
On the list reordering, when an item is clicked in the listbox, you can refer to it by:
List1.ListIndex 'this gets the zero based index of the list item OR
List1.List(List1.ListIndex) ' this gets the string value of the selected list
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Dim strCompany As String
strCompany = txtCompany.Text
Dim findSQL As String
findSQL = "Select * " & _
" from Client " & _
" Where name like '" & strCompany & " '%"
the above is a SQL statement and i wish to populate a datagrid (either on the same page or a different one) with the results of the statement. How do i do this? Thank you!
|
|
|
|
|
Is this question regarding VB6 or VB.net ? They way to populate the datagrid are quite different for for vb6 and .net
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
sorry for lack of detail,and thank you for your time! its vb6, as it stands my code is:
Dim strCompany As String
Dim strLikeCompany As String
strCompany = txtCompany.Text
strLikeCompany = strCompany & "*"
Dim findSQL As String
findSQL = " Select ClientCode, Company, ContactName " & _
" from Client " & _
" Where Company LIKE '" & strLikeCompany & "'"
Set RS = Conn.Execute(findSQL)
Adodc2.RecordSource = findSQL
MsgBox ("Showing Results")
Me.Adodc2.Refresh
Me.DataGrid1.Refresh
but it displays the error "no recordset specified, command text was not set for command object." on loading and it fails to populate grid.
|
|
|
|
|
|
I want to declare the DTE.How to declare this one.If i use DTE directly,it is saying reference to non-shared member require the object reference or i have to import any class.
colAddins = DTE.AddIns()
cmds = DTE.Commands
cmdobj = cmds.Item("File.NewFile")
|
|
|
|