|
oh I see, thanks man. Ya, normally I define them as strings, which makes sense now.
|
|
|
|
|
Does it work?
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Add set nocount on to prevent the insert from returning a result.
create procedure AdminValidation
@UName varchar(10),
@PWord varchar(10)
as
set nocount on
insert into admin (u_name, p_word)
values (@UName, @PWord)
select u_name, p_word
from admin
Avoid using * in a select. Specify the fields that you want returned, that way the result of existing queries doesn't change just because you add a field to the table.
---
single minded; short sighted; long gone;
|
|
|
|
|
In a form in MS Access, I'm going to have numerous checkboxes...that when clicked on, populate a text body. Each checkbox points to a table that contains numerous paragraphs. So ideally, when each box is checked, its corresponding paragraph populates a text body. After all of the desired boxes are checked, the text body should have numerous paragraphs inside it. I want to be able to export this text body to a Word document, and save it as a specified file name. What would be the best way to go about this? I have a pretty good idea how to populate the text body using the database, but am alittle befuddled on how to export the data to Word. Thanks.
|
|
|
|
|
hello to ALL,
how can i create a user group,user in active directory using vb 6.0 OR VB.Net
any code ???
Is there any supported links ?????
plzzz help
-koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
The key words in your question are "Active Directory", "Create User", and "VB.NET". Let's see what happens when you type them into Google. Click[^]
|
|
|
|
|
i was using stoed procedure and getting the following eror.
invalid object name adminvalidation
the code is as follows
Dim con As New SqlConnection(connectionstring)
con.Open()
Dim cmd As New SqlCommand("AdminValidation", con)
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Parameters.Add("@uname", Data.SqlDbType.VarChar).Value = TextBox1.Text
cmd.Parameters.Add("@pword", Data.SqlDbType.VarChar).Value = TextBox2.Text
cmd.ExecuteNonQuery()
adminvalidation is stored procedure name.
i have gone though This Article But in vain
-- modified at 8:30 Friday 8th June, 2007
|
|
|
|
|
And does the stored procedure actually exist in the database to which you've connected?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Problem is solved.
Sorry sir, there was an error in writing the corect table name into stored procedure.
Thanks a lot.
-- modified at 8:34 Friday 8th June, 2007
|
|
|
|
|
Can I or how can I populate a TreeView control using records in two table? Let say Parent Nodes comes from Table1 and each Parent Node has a child comming from Table2.
+--- Record 1 from Table 1
| |
| + Child 1 from Table 2 with reference to Record 1 in Table 1
| |
| + Child 2 from Table 2 with reference to Record 1 in Table 1
|
+--- Record 2 from Table 1
| |
| + Child 1 from Table 2 with reference to Record 2 in Table 1
|
+--- Record 3 from Table 1
| |
| + Child 1 from Table 2 with reference to Record 3 in Table 1
| |
| + Child 2 from Table 2 with reference to Record 3 in Table 1
| |
| + Child 3 from Table 2 with reference to Record 3 in Table 1
|
+--- Record 4 from Table 1
|
+ Child 1 from Table 2 with reference to Record 4 in Table 1
|
+ Child 2 from Table 2 with reference to Record 4 in Table 1
Hope that one will clear my question.
Thanks in advance.
qhYzme
|
|
|
|
|
What's the meaning of
Child 1 from Table 2 with reference to Record 1 in Table
|
|
|
|
|
Sorry for that. what i mean is "Child 1" came from Table 2 and had a reference (let say an ID) from a "Record 1" in Table 1. which means all child node are came from Table 2 and all parent node are came from table 1. just like in table/drawing i included in my post.
+--- Record 1 from Table 1 (TABLE 1 ID = '001')
| |
| + Child 1 from Table 2 with reference to Record 1 in Table 1 (TABLE 2 ID = '001')
| |
| + Child 2 from Table 2 with reference to Record 1 in Table 1 (TABLE 2 ID = '001')
|
|+--- Record 2 from Table 1 (TABLE 1 ID = '002')
| |
| + Child 1 from Table 2 with reference to Record 2 in Table 1 (TABLE 2 ID = '002')
|
|+--- Record 3 from Table 1 (TABLE 1 ID = '003')
| |
| + Child 1 from Table 2 with reference to Record 3 in Table 1 (TABLE 2 ID = '003')
| |
| + Child 2 from Table 2 with reference to Record 3 in Table 1 (TABLE 2 ID = '003')
| |
| + Child 3 from Table 2 with reference to Record 3 in Table 1 (TABLE 2 ID = '003')
|
|+--- Record 4 from Table 1 (TABLE 1 ID = '003')
|
| + Child 1 from Table 2 with reference to Record 4 in Table 1 (TABLE 2 ID = '003')
| + Child 2 from Table 2 with reference to Record 4 in Table 1 (TABLE 2 ID = '003')
as you can see, in Table 1 there are 3 records and Table 2 have 3 record in it. and for each record in Table 1 have a corresponding child (link record / relation to) in Table 2
anyway, thanks for the reply.
|
|
|
|
|
thanks for all you guys. i got it, there something wrong with the flow and records in my table.
|
|
|
|
|
Hi,
I am using VB.NET 1.1 and I am having difficulty in finding a starting point in my array. My array is filled with Product objects. Lets say I want to start at row 301 and display all the products till row 600, how do I do this?
I have the following, but I don't know what to do further:
ByRef productArray As ArrayList (this is a parameter to this function.
Dim p As New Product
Dim i As Integer
For i = intStart To intEnd
For Each p In productArray
Response.Write("SKU: " & p.ID)
Next
Next
Please can someone help me??
Regards
ma se
|
|
|
|
|
For i = 301 To 600
p = productArray(i)
Response.Write("SKU: " & p.ID)
Next
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Thanks Colin,
I was wondering if the same could be done for a SQLDataReader, using .NET 1.1. I have all the records in a datareader, and I am supposed to read in 300 records at a time. Depending on the page number. Page 1 should display records 1 to 300, page 2 should display records 301 to 600.
After populating the data reader, is it possible to start reading from a certain record?
Thanks
ma se
|
|
|
|
|
ma se wrote: After populating the data reader, is it possible to start reading from a certain record?
No a data reader cannot be navigated in a random access way. You need to read in the first 300 rows and discard them. You would be better filtering that out int he SQL query you sent in the first place.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hi all,
some one can tell me how to solve regional settings problems in vb.net using oracle as dbms? I code windows applications in vb.net 2003 that runned under windows xp(Italian version). After changed OS version, my applications run wrong cause of regional settings(date ,time and currency formats). Is it possible to fix the bug without recoded entire application source?
Thanks a lot
TT from Roma-IT
|
|
|
|
|
TexasTornado wrote: After changed OS version, my applications run wrong cause of regional settings(date ,time and currency formats). Is it possible to fix the bug without recoded entire application source?
I doubt it. You haven't posted any code samples, but it sounds like you wrote your code without any regard for the culture it's running under. For example, you may have used your own custom formatting strings and used the Format overloads that don't take a IFormatProvider object to provider culture information.
There's no little "switch" that's going to fix that for you. It's going to take a complete code review to add in culture tolerance into your application.
|
|
|
|
|
I have created a stored procedure in MS SQL Server. It worked well there, but I want to call it from my vb application by sending a parameter to get the result from the database. Who can tell me how?
Thankz
|
|
|
|
|
|
Nine_ wrote: Who can tell me how?
Did you mean: How do I do this?
If I answer "Who can tell me how?" then my answer would have to be "I can" - but that is not very helpful to you. Is it?
The SqlCommand object has a Parameters property. You just need to Add your parameters to it.
e.g.
cmd.Paramters.Add("@SomeParameter", someValue)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
I would just like to add, that for .NET 2.0 the Add method has been deprecated and the method AddWithValue should be used instead (with the same parameters).
|
|
|
|
|
szukuro wrote: I would just like to add, that for .NET 2.0 the Add method has been deprecated
That is not entirely true. Only one overload of the Add method has been deprecated. The remaining overloads are acceptable.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|