
shootsnlad
Avatar/Signature-
Posts
46 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by shootsnlad
-
Couple of questions, but first a background. Have a server with Server 2003 on it. IIS 6.0, SQL 2005. Bought a domain from god*ddy. I also have internet running through a DSL router. Currently router is set to let http traffic through on port 80. Question is does anyone have any good sites for getting IIS setup correctly for me to host a ASP.NET app. Also any tips on getting the domain to point to the local server through the router. The router has a public IP, server does not. NAT is enabled and the routing should route port 80 to the private IP of the server. Suggestions or tips? Thanks a lot!
-
Ok, I have a session variable called "CheckType". I have it in my global.aspx blanked out: Session("CheckType") = "" I then have a page where I assign a value to it: Session("CheckType") = "DIRECT" I then do a Response.redirect onto another page. Then I try to reference the value of the session variable: If Session("CheckType") = "DIRECT" then..... It is always blank. Should I not have it in global.aspx?
-
Anyone else have any ideas on this? Thanks!
-
I have a e-commerce site I'm doing that is selling CD's. The person obviously wants to let the customer play samples of their CDs songs. These are stored in wav's that are 3.5 MB or an MP3 that is about 150k. When they click on the sample link I want the current window to stay, but to launch whatever default music player they have on their system for that particular type of music file (mp3 or wav) and play the sound file for them. Would a link to the file work? but then how do I keep them on the page? Ideas? It maybe simple, and I'm just missing it. Thanks!
-
I have the field defined as a memo in Access, and I know I'm not over that size limit.
-
I have a textbox tied to a dataset and then into an Access database. The textbox is set with a maxlength of 0. The field in the Access database is a memo field. Where the dataset is defined, the field is set as string. The textbox will accept unlimited (or 65000+) characters, and I know a memo field is the same length in Access, but when the contents of the field are saved, I believe it is truncated at 255. I'm thinking it is because in the dataset the field is defined as a string. Does a string have a limit? I noticed there was a notation option, should I use that? Thanks!
-
I am trying to do an update to an Access table from VB and I'm getting an error of "Value was either too large or too small for an Int16". I don't think any of the fields values are outside of what kind of fields they are and I can go into Access and add the exact same data into a row. If it would help I can post what kinds of fields there are and what I am trying to put into each field. Thanks.
-
I have a program that updates a Access database through the use of a dataset, dataadapter, and connection. I let the dataadapter create all my statements, and I built in from the dataset. My problem is when I do an update I get the message "Syntax error in update statement". I copied the sql update statement into Access, plugged in the data, and it ran fine. So I'm not sure why there is a syntax error. The update statement is: UPDATE Vehicle SET Make = ?, Model = ?, VehicleID = ?, VINNum = ?, Year = ? WHERE (VehicleID = ?) AND (Make = ? OR ? IS NULL AND Make IS NULL) AND (Model = ? OR ? IS NULL AND Model IS NULL) AND (VINNum = ? OR ? IS NULL AND VINNum IS NULL) AND (Year = ? OR ? IS NULL AND Year IS NULL) Most of the code is generated and the changes on the form are put into a new dataset and then the command to update the database is: OleDbDataAdapter1.Update(ChangedRows) Any ideas what could be wrong? This has worked fine in other programs I have used it in. Thanks!
-
example Yes, if you could post an example, it would be appreciated. I did some searching for it and came up with nothing. Thanks!
-
I have a form that is linked with the data bindings to a Access database. I have a datetimepicker object on the form. The text data binding property of that object is linked with a date field in the Access database. When the form is brought up and the user goes from record to record everything works fine. When they add a new record and they pick a date and then update the record, everything again works fine. Now, if they add a new record, and then pick everything else, but the date (which will by default say today), then I get an error about the date being a null value. Even though the date says today, it thinks it is null. I tried to assign the value of the datetimepicker to today by default, but it still thinks it is null. There is also no 'text' propery on the object. Any ideas on how to fix this? Hopefully I explained myself somewhat clearly. Thanks!
-
I have a program that references an Access Database. I want to write a report that this program launches that will ask the user a question (such as, which badge number?) and then it will pull the information depending on what the user entered. Now I have VB .NET standard, but I have a copy of Crystal Reports 9 on my PC. Where do I start on this one?
-
I hope this is the write group to post this in. I have a program that I want the deploy onto one of our network drives. The database resides on the network, so I would like the program to also. When I run the program from my hard drive, referencing the database on the network, it works fine. When I run the program from the network drive, referencing the database in the same folder on the network drive, I get the following: Now, I'm not familiar with the .NET security policy administration tool, so I thought I'd ask for some help one this. Thanks. shootsnlad
-
That's it. I never copied that particular group of coding. Thanks a lot. It always seems to be the simplest things.
-
Public Class FrmMeterListBox Inherits System.Windows.Forms.Form Dim metar(50, 2) As String Dim numfound, p As Integer Private Sub FrmMeterListBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim reccount, i As Integer reccount = 0 isfound = False numfound = 0 For p = 1 To 50 metar(p, 1) = "" metar(p, 2) = "" Next p = Me.BindingContext(objMeter, "Water_meter").Count Do Until (reccount = Me.BindingContext(objMeter, "Water_meter").Count) If IsDBNull(objMeter.Water_Meter.Rows(reccount).Item("tap_number")) Then Else If objMeter.Water_Meter.Rows(reccount).Item("tap_number") = tapnum Then numfound = numfound + 1 If numfound = 1 Then whereiam = reccount isfound = True metar(numfound, 1) = objMeter.Water_Meter.Rows(reccount).Item("ser_number") metar(numfound, 2) = whereiam ElseIf numfound > 1 And numfound < 51 Then metar(numfound, 1) = objMeter.Water_Meter.Rows(reccount).Item("ser_number") metar(numfound, 2) = reccount End If End If End If reccount = reccount + 1 Loop If numfound > 1 Then mlist.Items.Clear() For p = 1 To numfound mlist.Items.Add(metar(p, 1)) Next MsgBox("There are multiple meters for this tap slip. Please click OK and pick the one you want to display", MsgBoxStyle.OKOnly, "Multiple Meters") For p = 1 To numfound If metselect = metar(p, 1) Then whereiam = metar(p, 2) isfound = True End If Next End If Me.Hide() Try Dim mc As New frmMeterCard() mc.ShowDialog() Catch End Try End Sub End Class Now the 'p =' after the For...Next.. is the one that shows 0 rows. I just put that in there to test the next Do Until line. It skips by the do until because the reccount = 0. I have a dataset attached to this form called 'ObjMeter', which references a typed dataset called 'Meter'. If I double click on that in my solution explorer, my table is in there. I can also do a "Retrieve data from table' and it brings back my 4 rows. The name of the table in the database is "Water_Meter". Ideas?
-
I tried that and did not have any luck. It still returns 0 rows. I just don't understand why it is not working. I have used the exact same method in the program on 6 or 7 other forms in the program. This particular one always returns 0 rows. I guess my only option is to figure out another way to get to the table. The wierdest thing is that I was using connecting to the same table on a different form, the exact same way, and then when I created a new form and tried to connect from that, it doesn't work. I'll probably just go back to my other form and use the connection from there. Thanks for the suggestions.
-
I have a very frustrating problem and I am not sure why it is not working. I have the following code: p = Me.BindingContext(objMeter, "Water_Meter").Count Now 'p' should come back with the number of rows that is in the "Water_Meter" table. There are 4 rows, yet 'p' is always 0. ObjMeter is setup to reference a Meter dataset that is tied to that table. Why would it return 0? Even this returns 0: p = Objmeter.Water_Meter.rows.count I am very confused as this has worked in every other part of my program. I have tried recreating objmeter, and the meter dataset with no luck. I even went into the meter dataset and viewed the data and it pulls in the 4 rows. I can't figure out what is different about this one. Please help!
-
In the form_load section of a form I want to ask a user to pick from a list of items., and depending on what they choose, will depend on what loads on the form. Now the way I have it now, is that in the form_load event of the form, I fill a list box. My problem is how to display the list box, and then do some processing and then display the form. The list box is not actually on the form because if I put it on the form, the form will display with it. Now the listbox is defined and filled in code, but when I simply do a listbox.show, nothing happens. So here is what should happen in what order. Form_load event starts Listbox is filled Listbox is displayed User clicks on list item Form_load continues, searching for item chosen Form_load event ends Form is displayed Ideas? I think a list box is the way to go, but I could be wrong here. Thanks. shootsnlad
-
I have an Access Database with some fields in it. 4 that are dates, and 1 is a time field. I have them setup as 'Date/Time' fields in Access with the 'Format' setting as 'Short Date' for the date fields and 'Medium time' for the time field. Now I have a Connection, Data Adapter, and Dataset in VB .NET setup to reference that table. I then have a form with all bunch of text boxes on it that are bound to the dataset and it's fields. Now, when I create the dataset I just drag the table out of the Server Explorer to get the table definition. I change the 'Date/ Time' type to 'Date' in the definition for the date fields and I change the 'Date/Time' to 'Time' in the definition for the time field. My problem is the date text boxes still go with the long date (the date and time) and the time text box still display the long date, instead of just the time. It also saves to the database this way. Now I thought by having it defined in the dataset, as well as in Access, it should go with the short date, and time. Any ideas? Thanks. shootsnlad
-
Field and record delimited text file
shootsnlad replied to shootsnlad's topic in Directory / File IO / Registry
Now comes the tricky part. How do I split up an indivdual field based on a Carriage Return? What do I put inside of the quotes for the Split function? shootsnlad -
Field and record delimited text file
shootsnlad replied to shootsnlad's topic in Directory / File IO / Registry
Nevermind, I got it. It should be: Sr = system.io.File.OpenText(filename) Thanks! -
Field and record delimited text file
shootsnlad replied to shootsnlad's topic in Directory / File IO / Registry
How would I go about reading the whole file into a string? I know how to read a single line of the file into a string, but not the whole file. Would I use a StreamReader? I have the filename in a string but when I try to do the following, it doesn't recognize "file": dim sr as system.io.streamreader Sr = File.OpenText(filename) Thanks... -
I have a file that I need to split into fields within records. I was hoping to split it into an single array for each record with the fields being each part of the array. The fields are separated with the pipe "|" system. The records are seperated by the "~" system. The field delimits aren't too bad, but I've never worked with a record delimiter. Any ideas on this? Thanks! shootsnlad
-
I have a program I am trying to get connected directly to a Informix database via ODBC, instead of having to go through Access and then to the database. I first tried using the wizard in Standard VB.NET, but I always got an error message about not being able to do what I wanted in this version of Visual Studio. Something about only being able to conect to SQL Server Desktop Engine databases and Access Databases. I then decided to use ADO.NET. I am having a problem with the connection string. I think it has something to do with the provider. Here is the error message I get: Here is my code: Dim dagisconstring As String Dim textline As String dagisconstring = "Provider=Microsoft OLE DB Provider for ODBC Drivers;DSN=dagisNT;DB=dagis;HOST=198.212.171.17;SERV=turbo;SRVR=DBQ_Informix;PRO=onsoctcp;UID=informix;PWD=informix" Dim dagisdbcon As New System.Data.OleDb.OleDbConnection(dagisconstring) dagisdbcon.Open() Dim emptycityda As New System.Data.OleDb.OleDbDataAdapter("Select * from dub.city_parcels", dagisconstring) Dim emptycityds As New DataSet() emptycityda.Fill(emptycityds, "dub.city_parcels") Dim emptycitydt As DataTable = emptycityds.Tables("dub.city_parcels") Thank you for the help. For now I'll have to stick with the Access link.
-
I have a pipe delimited text file. It has numerous fields in it. The fields are different size for each line of the file, so there is no way for me to tell what is in position X, and so on. I need to load in the file into a temp table I created, so I can compare the tables later on. I have a few ideas on how to do this, and would like some opinions on them as well as which functions I should look into, depending on what idea I use. 1. Read the file character by character, separating the fields by knowing they are separated by the pipe '|' system, and also going from record to record, line to line. 2. Throw out the idea of a temp table and just do the comparison straight from the text file to the comparison table record by record. If the data from the file needed to be loaded, I would still have the separate the fields manually. 3. Hoping VB.NET has some kind of code where it would know about delimited files. 4. Import the file into Access, load the temp table from the imported table. (I would like to automate the whole process however, so I consider this a last resort) Thanks for the help!