|
Sounds like you're calling a proc and failing to provide the parameters it needs, based on the limited info you posted.
|
|
|
|
|
This is one of my button can u take a look and is there a problem here???
Dim sqlStr As String = ("Select * from EventTable")
Dim StrActionName As String = ""
Dim dTable As DataTable
Dim db As New DBController
dTable = New DataTable()
db.Connect("PCMgr.mdb")
db.retrieveDTable(sqlStr, dTable)
Dim TReader As DataTableReader
TReader = New DataTableReader(dTable)
While TReader.Read
StrActionName = dTable.Rows(0)("ActionName")
If StrActionName = TxtActionName.Text Then
db.Connect("PCMgr.mdb")
db.InsertRecord("Delete from EventTable where ActionName = " + TxtActionName.Text)
db.Close()
End If
End While
End Sub
|
|
|
|
|
Well, for a strt, your string in
Subjugate wrote: db.InsertRecord("Delete from EventTable where ActionName = " + TxtActionName.Text)
is not in quotes. For second, I have no idea what DBController does, but InsertRecord doesn't seem like the method to call with a line of SQL for deleting records. Either way, I would never write an app like this, it is nasty. I'd use stored procs, and a clear data layer.
|
|
|
|
|
Sorry i dun quite understand u... For do u mean by not in quotes?
|
|
|
|
|
Do you know what quotes are ? Passing a string variable using SQL requires the string to be in quotes 'like this'
|
|
|
|
|
oic... Ya i know wat is tt. I already added the quotes in and it works. i think the error is cause by the missing quotes. Thanks a lot..
|
|
|
|
|
Hi, when I programmed in VB6, I use to love the index property of controls. (...button(index).Visable=True... for example) This would let me set properties of multiples contorls in a simple for...next loop. As far as I can see in VB.NET 2003, It's gone. Is there a new way of doing this or was that bad programming practice?
Thanks
Rob
|
|
|
|
|
Most things VB6 did were bad practice
There's a Controls collection on your form. You can access it by index if you want. You can also step through all the controls and look for controls of a type and work with those, if you want to.
|
|
|
|
|
how to use HTML inside a messagebox? In java you can cutomize the messagebox using HTML. can i use this function in vb.net 2003? Thanks
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
No. You can write your own, but that's all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ok thanks for your advice!! cheers
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
hi everybody
I need to get the state of the default video device, I'm making a photo demon and I need to check if the device is available or not avoiding showing the device selection window.
I've searched a lot but didn't find anything related... I would really apreciate any help...
thanks
Regards
Christian
|
|
|
|
|
It depends on what library you're using to communicate with the webcam. But, generally, if the device shows up in the device list, it's connected to the machine. Usually, the only way to tell if the device is available for use (it could be in use by another application!) is to try and open the device to get an image. If the open fails, it's not available.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Well, im using a library that I got from here and it imports the method capCreateCaptureWindowA like this.
[DllImport("avicap32.dll", EntryPoint="capCreateCaptureWindowA")]<br />
public static extern int capCreateCaptureWindowA(string lpszWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hwndParent, int nID);
when I try to start the capture and the device is busy, it shows a device selection window, that's what I'm trying to handle. If the device is already taken by another application , I want my program to detect it and don't take any picture.
Thanks in advance
Best regards
Christian Arenas Díaz
|
|
|
|
|
You'll have to ask the person that wrote the article. We're not a company that puts out libraries for commercial use. Code Project is a massive individual effort. No two people will know about the in's and out's of every article on the site.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I've seen many sites and searched a lot, but I haven't found my exact answer. Help me please...
Well, I think that everything has to be said in the ConnectionString. Don't you think so?
But I have 2 steps:
1.Connecting to server and then (sth like what CuteFTP. (you know that it can do everything itself. Even changing the file(s) permission. I mean it's trusted by the server. How can I also be let to change, update and maybe delete a file on server( e.g. the Access DB file)
2.And then conenctiong to DB
CAN I HAVE THE EXACT CONNECTIONSTRIGN PLEASE???
Much more than thanks!;)
|
|
|
|
|
|
You mean the only I have to do is using and working with a right connections string?
I knew that but I thaught an alone connection string isn't enough.
So I have to use sth like (1) for SQL Server DBs and sth like (2) for Access. Yes?
(1):
connectionstrings.com | SQL Server | SQL Connection (.net) | Connect via an IP address:
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=myUsername;Password=myPassword;<br /> (((But where to enter the username and password of host? Of course DB is not public viewable)))
(2):
connectionstrings.com | Access | OLE DB, Oledb Connection (.net) | There wasn't a Connect via an IP address section
What do I have to do?
Thank you
|
|
|
|
|
Seyyed Mohammad Hassan Naji wrote: connectionstrings.com | Access | OLE DB, Oledb Connection (.net) | There wasn't a Connect via an IP address section
You cannot use IP addresses with Access. You have to supply the machine name on the network and Access is only visible on the network. You cannot use it as a server like SQL 200x.
|
|
|
|
|
|
Hi Seyyed,
Seyyed Mohammad Hassan Naji wrote: please link a clear and obvious way to connect to an SQL Server DB on server. I'd searched a lot before asking in this topic
Not sure exactly what you're looking for, but the connectionstrings website is what I use.
Paul
|
|
|
|
|
I want my program to update, change, read, delete and do everything (updating is the most important) with a SQL Server database that is on server. It can take the username and password of host control panel, the username and pass of ftp account (if needed), and of course the username and pass of the SQL Server database.
The connection string of accessing SQL Server with IP address doesn't pay attention to the username and password of host. Are they really trivia? Don't they help us when connecting to DB?
In other words are the username and password of SQL Server database (on host) enough to connect to database and do everything with that?
|
|
|
|
|
Seyyed Mohammad Hassan Naji wrote: In other words are the username and password of SQL Server database (on host) enough to connect to database and do everything with that?
No. You still need username and password. SQL Server has the default 'sa' username and it is strongly suggested not to use this username from your apps. Pretty much all of the connection strings on the website I suggested, require username and password.
Seyyed Mohammad Hassan Naji wrote: I want my program to update, change, read, delete and do everything (updating is the most important) with a SQL Server database that is on server. It can take the username and password of host control panel, the username and pass of ftp account (if needed), and of course the username and pass of the SQL Server database.
You should have your app do the updates/read/create/delete and an ftp account is not really necessary. Take a look at the numerous excellent articles on this site that show how to do database driven apps
Paul
|
|
|
|
|
Hello, I made an application that browse through a list of urls and i was wondering to make it multithread. i need some help with that im a litle confused convining Multithreading with the axwebbrowser events. thanks, Mike
|
|
|
|
|
The webbrowser control will only open one URL at a time. You can't send it multiple URLs from different threads and have them all be retrieved.
The only way around that is to use one webbrowser control for each thread. But, this gets VERY resource intensive. If all you're doing is downloading a single page, without care about any images on that page, then you might want to consider using the much lighter weight HttpWebRequest[^] class to fetch the pages instead.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|