|
I dunno how VB handles this sort of syntax, why not set dnsip first, THEN set teh RecordSource on the next line ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm not much of an expert on ado but I can see at least one thing is wrong here. You have 2 equals statements which I think is illegal. Either your first " should be between your = and ado.Recordsource if you are trying to turn that whole statement into a string or you should do this in 2 lines of code if you are trying to make 2 assignments.
|
|
|
|
|
Seriously, pickup a beginners book on VB.NET and work through it. What you're doing is legal, but that statement doesn't work how you're thinking it does.
|
|
|
|
|
No, he'd rather ask the same question again.....
( about 3 threads up )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: No, he'd rather ask the same question again.....
Why do we even bother...
|
|
|
|
|
For the few who listen....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm developing a VB6 program to draw boxes. I'm stuck with the programming. I've done about 90% of the functionality. I'm using teeChart from Steema software and works pretty fine. My problem is about box walls. Up to now I can draw them as lines in space. That implies that the are transparent. My client is asking for non transparent walls.
Do some body have any hint. I think my problem could be solved drawing 3d planes in OpenGL but I don´t now where to start.
The beginning could be a good starting point. What's OpenGL?
Greetings from México
quijoteMX
|
|
|
|
|
qujoteMX wrote: The beginning could be a good starting point. What's OpenGL?
Wow.
Well, first of all, VB6 is outdated, clunky, underpowered and nasty. Why are you writing software using it ?
OpenGL is the competitor to DirectX. I am not sure if VB6 can use DirectX, perhaps through COM. Using DirectX or OpenGL, your whole UI needs to be drawn using it, if you're not already using it, I doubt you can start now.
If you're just drawing a box using GDI, I guess your best bet is to flood fill them.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, i was wondering if anyone out there would be able to help me with (i think a simple) task that i am trying to do in VB, preferably VB6, however i do have .NET 2003.
The problem:
i am able to do basic stuff in (mostly) VB6 but i have been trying to figure out how to make a programme to automatically save a picture from a certain address of a website.
i have a made a simple broswer using ie controls in VB6 but what i rly want to do is have a line or two of code in the programme that saves a picture to a file locally.
The reason:
on the met office website they have got IR satelite pictures of weather and i have been downlaoding the pictures manually for a while now and it's getting tedeous, i download them becasue of the nice looking image sequance they make when you run them like a movie :P it's just very interesting, anyway enough of all that talking....
can anyone help? i would be very happy if they could
|
|
|
|
|
First of all, don't learn VB6, it's a dead language, and it sucks.
If you know the exact images you want, you can just do a HTTP request in .NET code to get the image data and save it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
so if i google something like "HTTP request in .NET" and/or in the msdn i should find it.
thanks for replying.
|
|
|
|
|
Hello. I want to know How I can Load a data into Textbox from DataGride Where I clicking on the one cell or Row on it? But it is DataGrid, Not a DataGridView. In VB.Net 2005
Thanks avryone.
|
|
|
|
|
try following code snippent at Double click event of datagrid
If dgvServices.CurrentRowIndex = -1 Then Exit Sub<br />
If Not dgvServices.Item(dgvServices.CurrentRowIndex, 0) Is Nothing Then<br />
txtServiceName.Text = dgvServices.Item(dgvServices.CurrentRowIndex, 1)<br />
txtPrice.Text = dgvServices.Item(dgvServices.CurrentRowIndex, 2)<br />
Else<br />
<br />
End If
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
hi
i have sql statement that take value from 2 table how can i fill the data set with which table name
SqlSec = "Select s.SectionID, s.JoinedSection,c.Priority<br />
From [Section] s,Course c <br />
Where s.CourseID =c.CourseID AND SectionID in(select SectionID <br />
from Slot where SlotID= " & currentslot & ") <br />
ORDER BY c.Priority" <br />
Dim DataAdapter1 As New OleDb.OleDbDataAdapter(SqlSec, con)<br />
DataAdapter1.Fill(Sections, "Section") ' fill the data setits actually section and course tables
it give error msg (No value given for one or more required parameters)
|
|
|
|
|
I don't really understand what you want to do with your first question, perhaps if you explain how you want to use it?
The error message means that you have one or more names in your query that doesn't exist in the database. Check the spelling of the table and field names. Also, is SlotID a numeric field, and does currentslot contain a number?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi asha_s
asha_s: Wrote|
i have sql statement that take value from 2 table how can i fill the data set with which table name
You have a Join? and you want to fill it in a dataset ?
Next thing, your SQl statement is Clumsly written
Select s.SectionID, s.JoinedSection,c.Priority
From [Section] s,Course c
Where s.CourseID =c.CourseID AND SectionID in(select SectionID
from Slot where SlotID= "currentslot")
ORDER BY c.Priority"
Is "currentslot" a Variable or parameter that need to be passed ?
Another thing,The below Statement is not Complete,i assume you have declared and initialized your connection obect and declared your connection string, but i dont trust you have declared the dataset and the parameter object.if so remove that name and use "?", to show that this value is not known until runtime,this can be done only for oledb.
Dim DataAdapter1 As New OleDb.OleDbDataAdapter(SqlSec, con)
DataAdapter1.Fill(Sections, "Section")
the above can be written as
dim ds as new dataset
dim DataAdapter1 as new oledb.oledbdataadapter(sqlsec,con)
dataadapter1.SelectCommand.Parameters.Add("SlotID", inputVar)
dataadapter1.fill(ds)
If you have given enough info or Clear info for us we would help you.
Hope it helps
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
i've created an vb.net applicatin(desktop) which works fine in 1024*760 but controls alignment will change <then or="">then 1024 so anybody have a solution come on tell me ma
adsf
|
|
|
|
|
Set the align properties of your controls so they move as you'd like when the form resizes.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think you mean the anchor properties
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes, you are correct.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have written some code that detects when the computer is locked using the SessionSwitchEventHandler but want to detect when the screensaver has been activated.
Hope someone can help
Thanks
Graeme G
I am always greteful for any help!
|
|
|
|
|
|
My application runs on a network of 15 to 16 clients on a SQL Server 2000. Some of the modules perform transaction, i.e. they run more than one sql. I have tied the different sql statemels under the following procedure:
con.Open()
trans = con.BeginTransaction()
Try
'First Sql
cmd = New SqlClient.SqlCommand("INSERT INTO table1(col1, cl2, col3, col4) "VALUES('" & col1 & "','" & col2 & "','" & col3 & "','" & col4 & "')", con, trans)
cmd.ExecuteNonQuery()
'Second Sql
cmd = New SqlClient.SqlCommand("update table2 set colbl='" & col1 & "',colcl='" & t & "' where colbl =" & col1 & "", con, trans)
cmd.ExecuteNonQuery()
trans.Commit()
Catch ex As Exception
trans.Rollback()
End Try
con.Close()
Out of 700-800 inserts and updates, the system ignores the update statement. The value is inseted through the first statement, but it is not updated. So it shows a wrong balance. I am not able to diagonise the actual cause. The network is very good. My question is :
1. Even if the network fails, why does the rollback doesn’t happen.
2. Is my above code a right way for a commit procedure.
Please help. Thanks in advance.
|
|
|
|
|
The real way to do this is to put it all in a stored proc. This code seems to me like it should work, but a stored proc just makes more sense, and also allows you to pass parameters in a safer way, this code is ripe for SQL injection attacks.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|