
atmosphere1212
Avatar/Signature-
Posts
42 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by atmosphere1212
-
Ok, if i were to just expose the control collection as a property and then access it globally, how would I get the instance of the page when im in some random class?
-
-
The object in question is a ControlCollection. I dont need to persist it between postbacks, just between different controls and modules in the same post back.
-
Hey I want to store the address of an object in the session and then recreate the reference later on by the address. Is this possible? The reason im not storing the object in the session is because the object is large and i dont want to serialize it (the session is InProc). The object is also only going to be used during the current postback so i dont have to worry about the address pointing to the wrong object.
-
Ill take a crack at it, Theres a file in your C:\windows\system32 directory called shutdown.exe. Im pretty sure that this is the file that is run when you shut your computer down. Replace this file with a 'wrapper' file that you will create in visual studio that accepts a password. If the password is correct then run the shutdown file (which will be renamed) However, this is probably not safe at all :P
-
StreamReader Question
atmosphere1212 replied to atmosphere1212's topic in Directory / File IO / Registry
This doesnt work either. Heres my code Dim curChar As Integer = bStream.Read() While curChar <> 13 And curChar <> 26 And curChar <> -1 curLine += Chr(stripErrorChars(curChar)) curChar = bStream.Read End While That was the code which reads a line of text. The following is the stripErrorChars method Private Function stripErrorChars(ByVal curChar As Integer) As Integer If curChar = 0 Then Return 32 ElseIf curChar >= 128 Then Return 32 Else Return curChar End If End Function -
Hey, Im reading in characters of text, one by one, and I want to replace any odd characters of text (above ascii 128) with spaces. However.. when i use someInt = myStreamReader.Read It seems to completely skip over these odd characters.. How can I read these characters?
-
Hey I am populating a data table and eventually plan to use this table to add the rows to an sql server table. I will be creating each column in the table programatically. How can i create columns with sql server data types?
-
Hey Im wondering if anyone could shed some light on this entire situation for me. I want to be able to gather information about open windows. For example, i have the window handle (process.MainWindowHandle). What object can i create to reference the window. Im ultimately looking for information such as if its the active window, its name, etc.. thanks
-
Hey I have a bunch of code that works fine on my computer (which creates/writes to files, creates directories, ect) but when I try to do actions like these on my office network I get exceptions at sometimes where i shouldn't. For example, I when trying to set a files attribute on the network my program might ocasionally throw an exception. I think somethings happening on the network level, which i dont know much about. My idea is to encase all my System.IO calls in try blocks that are encased in a loop to retry if it fails. But my program uses alot of different IO Calls. Is there any way to figure out which ones could cause problems?
-
If i have an sql command that is guarenteed to return a single cell (ie a count command) is it possible just to grab the integer value without using a sqlDataReader or sqlDataSet, etc...
-
I have this program that will write to a log file with a specified path. When running this application from my computer and using the target network path this works fine. However, when i place the executable on the network and try to write to the same path (which happens to be the same directory that the executable is in) i get a file permissions error. I am using a fully qualified network path that i have access to. does anyone know what the problem could be?
-
I am using vb.net with sql server. I am programming a comparison algorithm which checks to see if for each file in a directory, there is a matching file name in a table column. My algorithm requires that both the array containing the disk file names and the column in the datareader be sorted in ascending order. However, I dont think that the comparison method used in vb is the same as that in sql server (order by). (Note: when grabbing the filenames from vb im using directory.getFiles() ) Does anyone know of any differences in the comparison methods between vb and sql server, and if so, instruct me on how to change my vb comparison method so i can sort the filenames in the same way as sql server does.
-
Hey I have a question regarding how to monitor the progress of a proccess. For example, I have some independant code and when I (the client of the code) call it, I want to display a progress bar (or whatever implementation of progress display i choose) of its proccess without embedding client specific code in it. ie, anyone who runs this proccess can get its progress without having to change it. What is the best method of doing this?
-
Quick question How do throw an exception such that it is printed to the command output when my program is aborted?
-
Im just wondering if its possible to change the dimension of an array thats already created to 0. I tried redim preserve(0) but the length becomes 1. Also does anyone know how to convert an ArrayList to a 1-dimensional array of some type.
-
VB.net Is there anyway to treat a network path as a local path without mapping the drive? Say I have a directory like "\\abc123.mydomain.com\folder1\". How would i check if that directory exists? And perhaps copy a file from there?
-
Im using an oledb data connection to an access database. There are five tables in my database, each table has a 1-1 relationship with eachother. I will be using a dataadapter to place the results of queries into a datatable. Each query will be a relational query between any number of the five tables. These tables are then free to be edited by the user. My question is this: What is the easiest way to set up the adapters for updates. I heard that its not a good idea to use the command builder if your using relations in your select statement. If i have to go through and create my own delete, insert, ect statements, could someone give me an example of, say, an insert statement? I am confused because im not sure which values im inserting into the database, shouldnt the adapter know somehow?
-
Hey I'm using vb.net and I have a question about opional params. if i have a sub: Public sub doSomething( ..., Optional Byref d1 as Date = Nothing ) ... End Sub I am getting an error saying cannot cast object to date in a constant expression. Why am I getting this? And how do I fix it to set some null default value?
-
SQLServer Extract - Blob
atmosphere1212 replied to atmosphere1212's topic in Database / XML / Reporting
I have figured out more information about my problem I have an ole object stored in a column of a sql server database. I want to extract the data and save it in its native format - word document. please help -
Im extracting a field from a database which contains a microsoft word document. Right now I am reading it in as bytes and outputing to a filestream with bytes but I am getting wierd encoding. Is this the proper way to read and output this data?
-
Connection String Problems
atmosphere1212 replied to atmosphere1212's topic in Database / XML / Reporting
How woudl I find that out? -
Im having a problem with my connection string. I know the following database exists in my local server but I get an error on SqlConnection.Open() Heres the one im having problems with (i know that the table exists on local for sure) Server=(local);Database=ExtTest;Trusted_Connection=True;Connect timeout=0 Where as this one works fine for me Server=serverName;Database=dbName;Trusted_Connection=True;Connect Timeout=0 where dbName is a database on serverName Thanks
-
Hey Im performing a blob (binary large object) extract from a database and the data has to go into a word document. I can extract from the db in almost any format: byte[], char[], string But these blobs are going to be VERY large and I want to use the least resources as possible. Im familiar with writing strings to msword but im wondering if theres a way to write a byte array or a char array to word instead to save on resources. Thank you
-
SQLServer Extract - Blob
atmosphere1212 replied to atmosphere1212's topic in Database / XML / Reporting
The data stored will be much larger than 2mbs. I dont think i should limit the max size of exported data. Also the data is binary. Is the GetBytes still a bad idea?