|
How can we pass the video from one machine to another machine.?
|
|
|
|
|
You're going to need the documentation on the webcam and how it makes the images avaiable publicly. If it's just one of those cams that uploads images to an FTP server or web server, then you're going to have to change your design to account for this. It would also help you greatly if the manufacturer of the webcam supplied an SDK for it.
|
|
|
|
|
Hi,
I have to insert data into DataGrid from Oracle database with edit/delete option. pls give me the code. I am new in VB.
Sumit
modified on Wednesday, December 3, 2008 2:10 AM
|
|
|
|
|
|
the solution which you provided does not working. Can u just help me out.
If I have 4 colums name a,b,c,d in stored in emp table(oracle database). and if i have to import those data into DataGrid then what is the simple code to import hose data into my form.
|
|
|
|
|
|
Hi
Use this code it will work.
but presently I m not using oracle s/w Change the ConnectionString then it will work then what ever operation u want pass by query.
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
On Error GoTo err
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & app.path & "\birth.mdb;"
cn.Open()
rs.Open("select * from emp", cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
err:
If Err.Number <> 0 Then
MsgBox(Err.Description & " " & Err.Number, vbInformation, "Error")
rstatus = False
Else
rstatus = True
End If
Ananda
|
|
|
|
|
This ismy code:
Dim CN As ADODB.Connection
Dim CP As ADODB.Command
Dim RS As ADODB.Recordset
Dim QSQL As String
Dim c As Integer
Dim r As Integer
Dim col_wid() As Single
Dim field_wid As Single
Dim lngWidth As Long
Dim DB As Long
'Connect to Oracele server begin
Set CN = New ADODB.Connection
With CN
.Provider = "OraOLEDB.Oracle"
.Properties("Data Source") = "CARE.TPSL"
.Properties("User Id") = "TESTDATABASE"
.Properties("Password") = "testdatabase"
.Open
End With
' select the data
QSQL = "select emp_id,emp_name,gender,dob,age,doj,city from emp"
' Get the records
Set RS = CN.Execute(QSQL, , adCmdText)
With DGrid1
.AllowAddNew = False
.AllowDelete = True
.AllowRowSizing = False
.AllowUpdate = True
.ColumnHeaders = True
.MarqueeStyle = dbgHighlightCell
.RecordSelectors = True
.RowHeight = 250
.ScrollBars = dbgBoth
DGrid1.Col = RS.Fields.Count
ReDim col_wid(0 To RS.Fields.Count - 1)
For DB = 0 To RS.Fields.Count - 1
DGrid1.DataBindings(DB) = RS.Fields(c).name
col_wid(DB) = TextWidth(RS.Fields(c).name)
Next DB
DB = 1
Do While Not RS.EOF
DGrid1.Row = DGrid1.Row + 1
For DB = 0 To RS.Fields.Count - 1
DGrid1.DataBindings(DB) = RS.Fields(DB).Value
Next DB
RS.MoveNext
r = r + 1
Loop
End With
'close the connection
CN.Close
Set CN = Nothing
// Now when I run the code it gives an Runtime error:6145 Invalid Column Index in the line (DGrid1.Col = RS.Fields.Count). So Please guide me to solve the problem.
|
|
|
|
|
It's been years since I last used vb6 but if I remember correctly, Col property is starting from 0 so if you want to refer to the last column it should be DGrid1.Col = RS.Fields.Count - 1
Also if I read the code correctly, you haven't created the columns before you use them (unless done somewhere else). Use debugger to see DGrid1 properties.
You mentioned that you're new to vb. Visual Basic 6 hasn't been supported for years so if there's no really good reason why you should learn a legacy language, I strongly suggest that you move to Visual Basic .Net.
|
|
|
|
|
Sorry I m not using this method for dataGrid Instant of I will assigned values to datagrid control like each cell i assigned value..
|
|
|
|
|
Am going to give you an Idea, you have to finish it your self.
First Add a reference to the Oracle namespace and write the Following code to get data from the Oracle and Binding you have to know it its Simple use the Datasource property and Datamember.
using System.Data.OracleClient;<br />
using System.Data;<br />
<br />
<br />
namespace ORacle_Bind<br />
{<br />
class DAL <br />
{<br />
<br />
<br />
public Dataset Getdata()<br />
{<br />
String Constring = "blablabvl";<br />
<br />
OracleConnection con = new OracleConnection(Constring);<br />
<br />
OracleCommand cmd = new OracleCommand();<br />
<br />
OracleDataAdapter da = new OracleDataAdapter();<br />
<br />
cmd.CommandText = "your select statement";<br />
<br />
cmd.CommandType = System.Data.CommandType.Text;<br />
<br />
cmd.Connection = con;<br />
<br />
da.SelectCommand= cmd;<br />
<br />
DataSet ds = new DataSet();<br />
<br />
<br />
try<br />
{<br />
con.Open();<br />
<br />
<br />
da.Fill(ds, "My_Table");<br />
}<br />
catch (OracleException e)<br />
{<br />
throw;<br />
}<br />
finally<br />
{<br />
con.Close();<br />
}<br />
return ds<br />
}
Hope it Helps
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
modified on Wednesday, December 3, 2008 5:38 AM
|
|
|
|
|
The OP says he is using VB6 - why give him VB.NET code?
|
|
|
|
|
Hi,
Can u provide me the code for the same. I am facing this prob since yesterday. Through MSFlixgrid I can do the same but not able with DataGrid.
|
|
|
|
|
Can anyone help me about the code how to insert data into datagrid from database. Also tell me that without Adodc object it is possible to insert data. I am using VB 6.0
|
|
|
|
|
sumit5283 wrote: Can anyone help me about the code how to insert data into datagrid from database. Also tell me that without Adodc object it is possible to insert data. I am using VB 6.0
I really have no idea, sorry... have you tried data binding using a data source to your Oracle DB? Is this even possible for a datagrid? Maybe you should google for how to fill a data grid.
|
|
|
|
|
Hi, I have tried with databindings(), but it is not working
|
|
|
|
|
Am using datagrid to collect some data and in that i added a combobox(with its value and display member), textboxcolum . now i want to save it to data base while saving i want to save the selected value of the combobox and string in textboxcolum...Plz help me out in solving this
|
|
|
|
|
Do u need a complete col as combobox or perticular cell is like combobox
|
|
|
|
|
I have an old digital camera that the company who built it no longer supports and (though they exist, I'm pretty sure) NOONE seems to have any of the drivers for it.
So, what I would like to do, is write my own driver (HOPEFULLY in VB.NET) for the camera.
Is there a way to 'read' from a USB port, like we USED to be able to just read from serial ports?
IF there is, how can I make windows XP recognize the camera?
I would be happy if I could make Windows even think it was a serial port, and just read it like a serial port...
(the camera does have a usb plug, and a serial plug (both of which are non-standard, but I DO have the cable for the USB port, or else I would just come at it from the Serial side....)
I hope I put enough information in there... Is this possible?
|
|
|
|
|
bac512 wrote: write my own driver (HOPEFULLY in VB.NET)
Not a chance in hell.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
if all you need is copying images from camera to PC, then most cameras when connected through USB will have their image collection mounted as a disk that shows under Windows Explorer.
if you want to send commands to the camera (such as "take picture"), your chances are very slim; that only works for high-end cameras, which come with the required drivers.
writing your own driver is a major effort, normally not worth the trouble for old hardware. It can't be done using managed .NET languages, and it requires a full set of documentation on the target hardware.
|
|
|
|
|
Yeah, I'm basically just trying to copy the images off the camera that are on there now, not a major serious project, just basically a learning experience of what I can and can't do. And yeah, most camera do just show up as a drive, but, unfortunately, this one doesn't...
No, I'm not looking to send commands to it (other than stuff like start sending picture to computer), so really, I guess I'm not so much looking to write a serious DRIVER, just open a simple connection to talk to the hardware....
Surely, as I understand it, a USB is just a FAST serial port, data in, data out, so there should be some way to send my own data back and forth, isn't there? I don't really need it accessable anywhere other than in my little program... and of course, I'm an old VB6 programmer, and have been TOLD VB.net lets you do pretty much anything any other language would?
|
|
|
|
|
bac512 wrote: USB is just a FAST serial port
That is so wrong. USB is closer to Ethernet than it is to RS232C. You can connect multiple devices of various kinds to USB, using multiple ports (or a hub). USB will take care of addressing the devices, it has plug & play (so Windows knows what got connected), it transfers data in blocks not bytes, etc. There simply is no way to use a USB device without a driver.
If your camera has a serial port, I suggest you try that. It probably won't give you the performance you would hope, but chances are you get that in working condition.
|
|
|
|
|
I do see that now, I wasn't even thinking about connecting multiples (and I've got so much stuff hooked into a hub now as it is ) anyways, yeah, I think the serial port would be the best answer to try to get those pictures.. But I was hoping to learn about the USB ports.... Lemme try asking a new question then....
lets say I BUILT the device, and have all the information I need (which would be what?)
how would I talk to it? I'm sure, since usb is 'universal', there has to be a STANDARD/universal way to talk to it (getting the information back and forth, not necessarily doing anything with the data or device, just get them connected, and talking...)
A guy earlier said 'not a chance in hell' I believe... was he talking about me writing a driver for this camera with everything unknown, or writing a driver in VB.NET?
|
|
|
|
|
Hi,
the way USB is handled most of the time is you buy a commercial solution:
- either a peripheral (say a USB printer), which comes with a driver and probably some utilities too, so you don't really care how it connects, and how it works;
- or a microprocessor-based piece of hardware, for which you would demand your vendor to provide on the target side an operating system, development tools, libraries (including a USB stack) and lots of documentation; and on the PC side a driver for the OS of your choice. So in that situation too you would avoid developing a driver at either side; let the Intels, FreeScales, Renesas, and a few more worry about these, it does not make sense for the individual customer to develop that themselves. The vendor would have to come up with a solution that fits a general need; he could provide a
"mounts as a disk" interface, a "looks like a serial port" thingy, or whatever could be appropriate for a whole range of applications.
bac512 wrote: not a chance in hell' I believe... was he talking about me writing a driver for this camera with everything unknown, or writing a driver in VB.NET?
You should ask him, but the answer is: both. Developing a driver is a major effort, and Windows drivers currently cannot be developed in any of the managed (.NET) languages. Drivers need real-time processing, and managed languages need garbage collection, which suspends all threads when it feels like it, so Microsoft does not have a clue about making those two requirements compatible with each other.
|
|
|
|
|